Skip to content

Commit ea304e1

Browse files
Merge pull request #356 from splunk/test/INFRA-32636-Fix-failing-tests-for-PSA
Fixed failing tests for PSA in circleci and github-actions
2 parents 874ccc2 + 06249ea commit ea304e1

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.github/workflows/test_matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
matrix:
1111
os: [ubuntu-latest, macos-latest, windows-latest]
1212
python-version: [3.7]
13-
splunk-version: [7.2, 7.3, 8.0, 8.1]
13+
splunk-version: [8.0, 8.1, 8.2]
1414

1515
steps:
1616
- uses: actions/checkout@v2

.ignore_splunk_internal_errors

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_wrong_outputnew
2+
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_no_inputfield
3+
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_no_lookup
4+
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_nonexistent_lookup
5+
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_wrong_AS_field_name_output
6+
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_wrong_as_field_name_output
7+
message_key="" message=Could not load lookup=LOOKUP-FAIL_test_wrong_output
8+
message_key="" message=Could not load lookup=LOOKUP-PASS_test_lookup_not_found

Dockerfile.tests

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
#You should have received a copy of the CC0 legalcode along with this
88
#work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
9-
FROM ubuntu:rolling
9+
FROM ubuntu:latest
1010

1111
RUN mkdir -p /work/tests
1212
RUN mkdir -p /work/test-results/functional
@@ -20,7 +20,7 @@ RUN export DEBIAN_FRONTEND=noninteractive ;\
2020
apt-get install -y --no-install-recommends apt-utils ;\
2121
apt-get install -y locales ;\
2222
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 ;\
23-
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
23+
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
2424

2525
ENV LANG en_US.utf8
2626

tests/test_splunk_addon.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ def empty_method():
180180
os.path.join(testdir.request.fspath.dirname, "addons/TA_broken"),
181181
os.path.join(testdir.tmpdir, "package"),
182182
)
183+
shutil.copy(
184+
os.path.join(testdir.request.config.invocation_dir, ".ignore_splunk_internal_errors"),
185+
testdir.tmpdir,
186+
)
183187
setup_test_dir(testdir)
184188
SampleGenerator.clean_samples()
185189
Rule.clean_rules()
@@ -192,6 +196,7 @@ def empty_method():
192196
"--search-interval=4",
193197
"--search-retry=4",
194198
"--search-index=*,_internal",
199+
"--ignore-addon-errors=.ignore_splunk_internal_errors",
195200
)
196201

197202
# fnmatch_lines does an assertion internally

0 commit comments

Comments
 (0)