Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update a query for Toggle component #384

Merged
merged 5 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 24 additions & 47 deletions .github/workflows/build-test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,45 +97,29 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install tools
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2
- name: Build Package
run: |
- run: curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2
- run: |
poetry install
poetry build
- name: artifact-splunk-unpacked
uses: actions/upload-artifact@v3
- run: |
poetry run ucc-gen build \
--source=tests/testdata/Splunk_TA_UCCExample/package \
--config=tests/testdata/Splunk_TA_UCCExample/globalConfig.json \
--ta-version=0.0.1
- uses: actions/upload-artifact@v3
with:
name: package
path: dist/*
if: always()

prerequisites-ui-tests:
runs-on: ubuntu-latest
outputs:
ta_example_version: ${{ steps.ta-example.outputs.version }}
steps:
- name: Fetch latest version of Splunk_TA example
id: ta-example
run: |
ta_example_version=`basename $(curl -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' -s https://api.github.com/repos/splunk/splunk-add-on-for-ucc-example/releases/latest | jq -r '.assets | last | .browser_download_url')`
echo "version=$ta_example_version" >> $GITHUB_OUTPUT
- name: Cache Splunk_TA example
id: cache_ta
uses: actions/cache@v3
- uses: actions/upload-artifact@v3
with:
path: Splunk_TA*.spl
key: ${{ steps.ta-example.outputs.version }}
- name: Download Splunk_TA example
if: steps.cache_ta.outputs.cache-hit != 'true'
run: curl -s https://api.github.com/repos/splunk/splunk-add-on-for-ucc-example/releases/latest | jq -r '.assets | last | .browser_download_url' | wget -i -
name: output
path: output/*

run-ui-tests:
needs:
- meta
- build
- prerequisites-ui-tests
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -146,7 +130,7 @@ jobs:
matrix:
splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }}
browser: ["chrome", "firefox"]
test_suit: [
test_suite: [
"test_splunk_ta_example_addon_logging",
"test_splunk_ta_example_addon_account",
"test_splunk_ta_example_addon_proxy",
Expand All @@ -162,31 +146,24 @@ jobs:
with:
name: package
path: dist/
- name: update submodule
run: |
git submodule sync
git submodule update --recursive --remote
- name: Cache Splunk_TA example
id: cache_ta
uses: actions/cache@v3
- uses: actions/download-artifact@v3
with:
path: Splunk_TA*.spl
key: ${{ needs.prerequisites-ui-tests.outputs.ta_example_version }}
- name: Setup for testing
run: |
mkdir output test-results
tar -xvf Splunk_TA*.spl -C output/
pip install git+https://github.com/pixelb/crudini
name: output
path: output/
- run: |
git submodule sync
git submodule update --recursive --remote
- name: Splunk Testing
run: |
mkdir test-results
export SPLUNK_VERSION=${{ matrix.splunk.version }}
SPLUNK_APP_ID=$(crudini --get tests/deps/splunk-add-on-for-ucc-example/package/default/app.conf id name)
SPLUNK_APP_ID=Splunk_TA_UCCExample
export SPLUNK_APP_ID
SPLUNK_APP_PACKAGE=output/$(ls output/)
SPLUNK_APP_PACKAGE=output/Splunk_TA_UCCExample
export SPLUNK_APP_PACKAGE
export TEST_SET=tests/ui
export TEST_BROWSER="${{ matrix.browser }}"
export TEST_SUITE="-k ${{ matrix.test_suit }}"
export TEST_SUITE="-k ${{ matrix.test_suite }}"
export SAUCE_USERNAME="${{ secrets.SAUCE_USERNAME }}"
export SAUCE_PASSWORD="${{ secrets.SAUCE_PASSWORD }}"
export SAUCE_TUNNEL_ID="${{ secrets.SAUCE_TUNNEL_ID }}"
Expand Down Expand Up @@ -229,12 +206,12 @@ jobs:
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results-${{ matrix.splunk }}_${{ matrix.python-version }}_${{ matrix.browser }}_${{ matrix.test_suit }}
name: test-results-${{ matrix.splunk }}_${{ matrix.python-version }}_${{ matrix.browser }}_${{ matrix.test_suite }}
path: test-results/*
- uses: dorny/test-reporter@v1
if: always()
with:
name: test-report-${{ matrix.splunk }}_${{ matrix.python-version }}_${{ matrix.browser }}_${{ matrix.test_suit }}
name: test-report-${{ matrix.splunk }}_${{ matrix.python-version }}_${{ matrix.browser }}_${{ matrix.test_suite }}
path: "test-results/*.xml"
reporter: java-junit

Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
Expand All @@ -30,7 +29,6 @@ MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "tests/deps/splunk-add-on-for-ucc-example"]
path = tests/deps/splunk-add-on-for-ucc-example
branch = main
url = https://github.com/splunk/splunk-add-on-for-ucc-example
[submodule "tests/deps/build/addonfactory_test_matrix_splunk"]
path = tests/deps/build/addonfactory_test_matrix_splunk
url = https://github.com/splunk/addonfactory_test_matrix_splunk
Expand Down
10 changes: 1 addition & 9 deletions Dockerfile-saucelabs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
#Splunk Connect for Syslog (SC4S) by Splunk, Inc.
#
#To the extent possible under law, the person who associated CC0 with
#Splunk Connect for Syslog (SC4S) has waived all copyright and related or neighboring rights
#to Splunk Connect for Syslog (SC4S).
#
#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 circleci/python:3.7
RUN curl https://saucelabs.com/downloads/sc-4.6.2-linux.tar.gz -o /home/circleci/saucelabs.tar.gz
RUN tar -xzf /home/circleci/saucelabs.tar.gz --directory /home/circleci/
CMD /home/circleci/sc-4.6.2-linux/bin/sc -u $SAUCE_USERNAME -k $SAUCE_PASSWORD -i $SAUCE_TUNNEL_ID --no-remove-colliding-tunnels -v --se-port 4445
CMD /home/circleci/sc-4.6.2-linux/bin/sc -u $SAUCE_USERNAME -k $SAUCE_PASSWORD -i $SAUCE_TUNNEL_ID --no-remove-colliding-tunnels -v --se-port 4445
16 changes: 2 additions & 14 deletions Dockerfile-tests
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
#Splunk Connect for Syslog (SC4S) by Splunk, Inc.
#
#To the extent possible under law, the person who associated CC0 with
#Splunk Connect for Syslog (SC4S) has waived all copyright and related or neighboring rights
#to Splunk Connect for Syslog (SC4S).
#
#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:latest
RUN mkdir -p /work/tests
RUN mkdir -p /work/test-results/functional
Expand All @@ -36,17 +28,13 @@ RUN export DEBIAN_FRONTEND=noninteractive ;\
ENV LANG en_US.utf8

COPY dist /work/dist
COPY tests/pytest-ci.ini /work/pytest.ini
COPY tests/ui/pytest-ci.ini /work/pytest.ini
RUN pip install /work/dist/*.whl
RUN pip install pytest-splunk-addon
RUN pip install pytest-expect
RUN pip install pytest-rerunfailures
COPY tests/entrypoint.sh /
COPY tests/deps/splunk-add-on-for-ucc-example/tests /work/tests
COPY tests/deps/splunk-add-on-for-ucc-example/.pytest.expect /work/.pytest.expect
COPY tests /work/tests
RUN cd /work/tests && ls
RUN cd ../..
COPY tests/deps/splunk-add-on-for-ucc-example/package /work/package

WORKDIR /work

Expand Down
Loading
Loading