Skip to content

Commit

Permalink
test:fixing failing tests for PSA in circleci and github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
harshilgajera-crest committed Jun 21, 2021
1 parent a80d3ea commit 06249ea
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7]
splunk-version: [7.2, 7.3, 8.0, 8.1]
splunk-version: [8.0, 8.1, 8.2]

steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 8 additions & 0 deletions .ignore_splunk_internal_errors
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_wrong_outputnew
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_no_inputfield
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_no_lookup
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_nonexistent_lookup
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_wrong_AS_field_name_output
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_wrong_as_field_name_output
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_wrong_output
message_key="" message=Could not load lookup=LOOKUP-PASS_test_lookup_not_found
4 changes: 2 additions & 2 deletions Dockerfile.tests
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
#You should have received a copy of the CC0 legalcode along with this
#work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
FROM ubuntu:rolling
FROM ubuntu:latest

RUN mkdir -p /work/tests
RUN mkdir -p /work/test-results/functional
Expand All @@ -20,7 +20,7 @@ RUN export DEBIAN_FRONTEND=noninteractive ;\
apt-get install -y --no-install-recommends apt-utils ;\
apt-get install -y locales ;\
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 ;\
apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git python-is-python3 python3-distutils python3-pip

ENV LANG en_US.utf8

Expand Down
2 changes: 1 addition & 1 deletion deps/build/addonfactory_test_matrix_splunk
5 changes: 5 additions & 0 deletions tests/test_splunk_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ def empty_method():
os.path.join(testdir.request.fspath.dirname, "addons/TA_broken"),
os.path.join(testdir.tmpdir, "package"),
)
shutil.copy(
os.path.join(testdir.request.config.invocation_dir, ".ignore_splunk_internal_errors"),
testdir.tmpdir,
)
setup_test_dir(testdir)
SampleGenerator.clean_samples()
Rule.clean_rules()
Expand All @@ -192,6 +196,7 @@ def empty_method():
"--search-interval=4",
"--search-retry=4",
"--search-index=*,_internal",
"--ignore-addon-errors=.ignore_splunk_internal_errors",
)

# fnmatch_lines does an assertion internally
Expand Down

0 comments on commit 06249ea

Please sign in to comment.