mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-08-02 07:27:35 +00:00
Split scenarios in different GA jobs
to parallelise better and allow re-running just the failed tests Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
parent
0c236b6145
commit
1e3efb57cc
11
.github/workflows/e2e-tests.yml
vendored
11
.github/workflows/e2e-tests.yml
vendored
@ -12,6 +12,15 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
e2e-tests:
|
e2e-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- label: "local-encryption"
|
||||||
|
- label: "remote-auto"
|
||||||
|
- label: "remote-static"
|
||||||
|
- label: "remote-https-pinned"
|
||||||
|
- label: "remote-https-bad-cert"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -19,4 +28,4 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
./earthly.sh +e2e-tests
|
./earthly.sh +e2e-tests --LABEL=${{ matrix.label }}
|
||||||
|
@ -99,6 +99,7 @@ e2e-tests-image:
|
|||||||
|
|
||||||
e2e-tests:
|
e2e-tests:
|
||||||
FROM +e2e-tests-image
|
FROM +e2e-tests-image
|
||||||
|
ARG LABEL
|
||||||
|
|
||||||
WITH DOCKER --allow-privileged
|
WITH DOCKER --allow-privileged
|
||||||
RUN ./scripts/e2e-tests.sh
|
RUN ./scripts/e2e-tests.sh
|
||||||
|
@ -55,4 +55,4 @@ kubectl apply -k "$SCRIPT_DIR/../tests/assets/"
|
|||||||
# https://stackoverflow.com/a/6752280
|
# https://stackoverflow.com/a/6752280
|
||||||
export KMS_ADDRESS="10.0.2.2.challenger.sslip.io"
|
export KMS_ADDRESS="10.0.2.2.challenger.sslip.io"
|
||||||
|
|
||||||
PATH=$PATH:$GOPATH/bin ginkgo -v --nodes $GINKGO_NODES --fail-fast -r ./tests/
|
PATH=$PATH:$GOPATH/bin ginkgo -v --nodes $GINKGO_NODES --label-filter $LABEL --fail-fast -r ./tests/
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
var installationOutput string
|
var installationOutput string
|
||||||
var vm VM
|
var vm VM
|
||||||
|
|
||||||
var _ = Describe("local encrypted passphrase", func() {
|
var _ = Describe("kcrypt encryption", func() {
|
||||||
var config string
|
var config string
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
@ -63,7 +63,7 @@ var _ = Describe("local encrypted passphrase", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// https://kairos.io/docs/advanced/partition_encryption/#offline-mode
|
// https://kairos.io/docs/advanced/partition_encryption/#offline-mode
|
||||||
When("doing local encryption", func() {
|
When("doing local encryption", Label("local-encryption"), func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
config = `#cloud-config
|
config = `#cloud-config
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ users:
|
|||||||
})
|
})
|
||||||
|
|
||||||
//https://kairos.io/docs/advanced/partition_encryption/#online-mode
|
//https://kairos.io/docs/advanced/partition_encryption/#online-mode
|
||||||
When("using a remote key management server (automated passphrase generation)", func() {
|
When("using a remote key management server (automated passphrase generation)", Label("remote-auto"), func() {
|
||||||
var tpmHash string
|
var tpmHash string
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ kcrypt:
|
|||||||
})
|
})
|
||||||
|
|
||||||
// https://kairos.io/docs/advanced/partition_encryption/#scenario-static-keys
|
// https://kairos.io/docs/advanced/partition_encryption/#scenario-static-keys
|
||||||
When("using a remote key management server (static keys)", func() {
|
When("using a remote key management server (static keys)", Label("remote-static"), func() {
|
||||||
var tpmHash string
|
var tpmHash string
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ spec:
|
|||||||
`, strings.TrimSpace(tpmHash)))
|
`, strings.TrimSpace(tpmHash)))
|
||||||
})
|
})
|
||||||
|
|
||||||
When("the certificate is pinned on the configuration", func() {
|
When("the certificate is pinned on the configuration", Label("remote-https-pinned"), func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
cert := getChallengerServerCert()
|
cert := getChallengerServerCert()
|
||||||
kcryptConfig := createConfigWithCert(fmt.Sprintf("https://%s", os.Getenv("KMS_ADDRESS")), cert)
|
kcryptConfig := createConfigWithCert(fmt.Sprintf("https://%s", os.Getenv("KMS_ADDRESS")), cert)
|
||||||
@ -297,7 +297,7 @@ install:
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
When("the no certificate is set in the configuration", func() {
|
When("the no certificate is set in the configuration", Label("remote-https-bad-cert"), func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
config = fmt.Sprintf(`#cloud-config
|
config = fmt.Sprintf(`#cloud-config
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user