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

Test/integration/rework #1607

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Test/integration/rework #1607

wants to merge 2 commits into from

Conversation

phbelitz
Copy link
Member

@phbelitz phbelitz commented May 10, 2024

Rework of integration tests

Checklist

  • PR is rebased to/aimed at branch develop
  • PR follows Contributing Guide
  • Added tests (if necessary)
  • Extended README/Documentation (if necessary)
  • Adjusted versions of image and Helm chart in Chart.yaml (if necessary)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.87%. Comparing base (1562cd9) to head (a7c43ed).
Report is 6 commits behind head on develop.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1607      +/-   ##
===========================================
- Coverage    88.08%   87.87%   -0.22%     
===========================================
  Files           36       35       -1     
  Lines         2509     2465      -44     
===========================================
- Hits          2210     2166      -44     
  Misses         255      255              
  Partials        44       44              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

test/integration/alerting/Dockerfile Dismissed Show dismissed Hide dismissed
test/integration/alerting/Dockerfile Dismissed Show dismissed Hide dismissed
@@ -40,3 +40,9 @@ kind-dev:

lint:
golangci-lint run --skip-dirs="test"

integration:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this should replace kind-int-test above?

@@ -40,3 +40,9 @@ kind-dev:

lint:
golangci-lint run --skip-dirs="test"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only your changes, but I guess PHONY needs an update

@@ -7,7 +7,7 @@ kubernetes:
# Connaisseur application version depends on the layout of the Helm deployment
# Thus, if unset, we default to the appVersion of the Chart.yaml
# tag: v1.2.3
pullPolicy: Always
pullPolicy: IfNotPresent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I'm against this change per se, but that doesn't fit here

Comment on lines +24 to +25
- `cert`: Test a custom TLS certificate for Connaisseur.
- `redis-cert`: Test a custom TLS certificate for Redis.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not just custom certs, but also update process for these, right?

- `redis-cert`: Test a custom TLS certificate for Redis.
- `upgrade`: Test upgradability of Connaisseur.
- `alerting`: Test alerting mechanisms.
- `other-ns`: Test whether Connaisseur works in other namespaces.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really clear to me

- id: pre-05
txt: Testing non official docker image and non sse testimage...
ref: non-official/non-sse:test
expected_msg: static deny
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing EOF newline

expected_msg: error during cosign validation
- id: r-06
txt: Testing signed cosign image...
ref: securesystemsengineering/testimage:co-signed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing EOF newline

echo -e ${SUCCESS}
fi
fi
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing EOF newline


ghcr_case() {
if [[ -n "${IMAGE+x}" && -n "${IMAGEPULLSECRET+x}" && "${GITHUB_WORKFLOW}" != "release" ]]; then
return 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is somewhat counter-intuitive with exit codes being the exact opposite of this, but maybe that's just me

@@ -0,0 +1,141 @@
#!/usr/bin/env bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you replace run_integration_tests with this? The previous utility did more. For example, I could locally run all integration tests with a single, easy command and go get a drink. With this it would be a lot harden

@phbelitz phbelitz mentioned this pull request May 24, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants