Skip to content

Commit e9bfaab

Browse files
committed
chore: remove package manager tests
These tests had the purpose of providing us with confidence that we can scan all supported package managers on a variety of images. They are not bringing us much value, because we already test all package managers with the rest of our fixtures in the general integration tests. The snyk-docker-plugin that we consume also has sufficient test coverage, so the package manager tests no longer serve their purpose.
1 parent 06c3d9e commit e9bfaab

File tree

9 files changed

+0
-289
lines changed

9 files changed

+0
-289
lines changed

.circleci/config.yml

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -31,96 +31,6 @@ main_branches_filter: &main_branches_filter
3131

3232
jobs:
3333
######################## PR OR MERGE TO STAGING ########################
34-
package_manager_test_apk:
35-
<<: *default_machine_config
36-
steps:
37-
- checkout
38-
- run:
39-
name: create temp dir for logs
40-
command: mkdir -p /tmp/logs/test/integration/kind
41-
- run:
42-
name: APK Test
43-
command: |
44-
export NVM_DIR="/opt/circleci/.nvm" &&
45-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
46-
nvm install v10 &&
47-
npm install &&
48-
export IMAGE_TAG=$([[ "$CIRCLE_BRANCH" == "staging" ]] && echo "staging-candidate" || echo "discardable") &&
49-
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=snyk/kubernetes-monitor:${IMAGE_TAG}-${CIRCLE_SHA1} &&
50-
docker pull ${KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG} &&
51-
npm run test:apk
52-
- run:
53-
name: Notify Slack on failure
54-
command: |
55-
if [[ "$CIRCLE_BRANCH" == "staging" ]]; then
56-
./scripts/slack-notify-failure.sh "staging-apk-tests-${CIRCLE_SHA1}"
57-
else
58-
echo "Current branch is $CIRCLE_BRANCH so skipping notifying Slack"
59-
fi
60-
when: on_fail
61-
- store_artifacts:
62-
path: /tmp/logs/test/integration/kind
63-
64-
package_manager_test_apt:
65-
<<: *default_machine_config
66-
steps:
67-
- checkout
68-
- run:
69-
name: create temp dir for logs
70-
command: mkdir -p /tmp/logs/test/integration/kind
71-
- run:
72-
name: APT Test
73-
command: |
74-
export NVM_DIR="/opt/circleci/.nvm" &&
75-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
76-
nvm install v10 &&
77-
npm install &&
78-
export IMAGE_TAG=$([[ "$CIRCLE_BRANCH" == "staging" ]] && echo "staging-candidate" || echo "discardable") &&
79-
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=snyk/kubernetes-monitor:${IMAGE_TAG}-${CIRCLE_SHA1} &&
80-
docker pull ${KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG} &&
81-
npm run test:apt
82-
- run:
83-
name: Notify Slack on failure
84-
command: |
85-
if [[ "$CIRCLE_BRANCH" == "staging" ]]; then
86-
./scripts/slack-notify-failure.sh "staging-apt-tests-${CIRCLE_SHA1}"
87-
else
88-
echo "Current branch is $CIRCLE_BRANCH so skipping notifying Slack"
89-
fi
90-
when: on_fail
91-
- store_artifacts:
92-
path: /tmp/logs/test/integration/kind
93-
94-
package_manager_test_rpm:
95-
<<: *default_machine_config
96-
steps:
97-
- checkout
98-
- run:
99-
name: create temp dir for logs
100-
command: mkdir -p /tmp/logs/test/integration/kind
101-
- run:
102-
name: RPM Test
103-
command: |
104-
export NVM_DIR="/opt/circleci/.nvm" &&
105-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
106-
nvm install v10 &&
107-
npm install &&
108-
export IMAGE_TAG=$([[ "$CIRCLE_BRANCH" == "staging" ]] && echo "staging-candidate" || echo "discardable") &&
109-
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=snyk/kubernetes-monitor:${IMAGE_TAG}-${CIRCLE_SHA1} &&
110-
docker pull ${KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG} &&
111-
npm run test:rpm
112-
- run:
113-
name: Notify Slack on failure
114-
command: |
115-
if [[ "$CIRCLE_BRANCH" == "staging" ]]; then
116-
./scripts/slack-notify-failure.sh "staging-rpm-tests-${CIRCLE_SHA1}"
117-
else
118-
echo "Current branch is $CIRCLE_BRANCH so skipping notifying Slack"
119-
fi
120-
when: on_fail
121-
- store_artifacts:
122-
path: /tmp/logs/test/integration/kind
123-
12434
build_image:
12535
<<: *default_machine_config
12636
steps:
@@ -516,18 +426,6 @@ workflows:
516426
requires:
517427
- build_image
518428
<<: *main_branches_filter
519-
- package_manager_test_apk:
520-
requires:
521-
- build_image
522-
<<: *main_branches_filter
523-
- package_manager_test_apt:
524-
requires:
525-
- build_image
526-
<<: *main_branches_filter
527-
- package_manager_test_rpm:
528-
requires:
529-
- build_image
530-
<<: *main_branches_filter
531429

532430
MERGE_TO_STAGING:
533431
jobs:
@@ -557,28 +455,13 @@ workflows:
557455
- build_operator
558456
- upload_operator
559457
<<: *staging_branch_only_filter
560-
- package_manager_test_apk:
561-
requires:
562-
- build_image
563-
<<: *staging_branch_only_filter
564-
- package_manager_test_apt:
565-
requires:
566-
- build_image
567-
<<: *staging_branch_only_filter
568-
- package_manager_test_rpm:
569-
requires:
570-
- build_image
571-
<<: *staging_branch_only_filter
572458
- tag_and_push:
573459
requires:
574460
- build_image
575461
- build_operator
576462
- unit_tests
577463
- system_tests
578464
- integration_tests
579-
- package_manager_test_apk
580-
- package_manager_test_apt
581-
- package_manager_test_rpm
582465
<<: *staging_branch_only_filter
583466
- deploy_dev:
584467
requires:

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
"test:integration:openshift4": "DEPLOYMENT_TYPE=Operator TEST_PLATFORM=openshift4 CREATE_CLUSTER=false tap test/integration/kubernetes.test.ts --timeout=900",
1414
"test:coverage": "npm run test:unit -- --coverage",
1515
"test:watch": "tsc-watch --onSuccess 'npm run test:unit'",
16-
"test:apk": "DEPLOYMENT_TYPE=YAML TEST_PLATFORM=kind CREATE_CLUSTER=true PACKAGE_MANAGER=apk tap test/integration/package-manager.test.ts --timeout=900",
17-
"test:apt": "DEPLOYMENT_TYPE=YAML TEST_PLATFORM=kind CREATE_CLUSTER=true PACKAGE_MANAGER=apt tap test/integration/package-manager.test.ts --timeout=900",
18-
"test:rpm": "DEPLOYMENT_TYPE=YAML TEST_PLATFORM=kind CREATE_CLUSTER=true PACKAGE_MANAGER=rpm tap test/integration/package-manager.test.ts --timeout=900",
1916
"start": "bin/start",
2017
"prepare": "npm run build",
2118
"build": "tsc",

test/fixtures/package-manager/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/fixtures/package-manager/apk/images.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/fixtures/package-manager/apt/images.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/fixtures/package-manager/rpm/images.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/fixtures/package-manager/template.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

test/integration/fixture-reader.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

test/integration/package-manager.test.ts

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)