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

feat: create tiertemplaterevision for each tiertemplate #1061

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

mfrancisc
Copy link
Contributor

@mfrancisc mfrancisc commented Nov 12, 2024

E2e tests for: codeready-toolchain/host-operator#1103

  • verifies that when creating a TierTemplate with the TemplateObjects field populated it triggers the creation of a TierTemplateRevision CR as well
  • verify owner reference of the TTR
  • verify labels are set correctly on the TTR

Jira: https://issues.redhat.com/browse/KUBESAW-146

# Conflicts:
#	testsupport/init.go
test/e2e/parallel/nstemplatetier_test.go Show resolved Hide resolved
testsupport/wait/host.go Outdated Show resolved Hide resolved
testsupport/wait/host.go Outdated Show resolved Hide resolved
testsupport/wait/host.go Outdated Show resolved Hide resolved
test/e2e/parallel/nstemplatetier_test.go Outdated Show resolved Hide resolved
@mfrancisc
Copy link
Contributor Author

seems like some infra/flaky issue:

  proxy_test.go:385: 
        	Error Trace:	/go/src/github.com/codeready-toolchain/toolchain-e2e/test/e2e/parallel/proxy_test.go:385
        	Error:      	Received unexpected error:
        	            	configmaps "kube-root-ca.crt" not found

https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/codeready-toolchain_toolchain-e2e/1061/pull-ci-codeready-toolchain-toolchain-e2e-master-e2e/1859128319136501760/build-log.txt

@mfrancisc
Copy link
Contributor Author

/retest

@mfrancisc
Copy link
Contributor Author

infra issues:

WARNING: timed out waiting for git server, will wait 1m4s
error: fatal: unable to access 'https://github.com/codeready-toolchain/toolchain-e2e.git/': Could not resolve host: github.com

/retest

Copy link
Contributor

@rsoaresd rsoaresd left a comment

Choose a reason for hiding this comment

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

Good job! 🚀 Just a minor question:

testsupport/wait/host.go Outdated Show resolved Hide resolved
@mfrancisc
Copy link
Contributor Author

/retest

Copy link

openshift-ci bot commented Dec 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: metlos, mfrancisc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

test/e2e/parallel/nstemplatetier_test.go Outdated Show resolved Hide resolved
test/e2e/parallel/nstemplatetier_test.go Outdated Show resolved Hide resolved
// But since the creation of a TTR could be very quick and could trigger another reconcile of the NSTemplateTier before the status is actually updated with the reference,
// this might generate some copies of the TTRs. This is not a problem in production since the cleanup mechanism of TTRs will remove the extra ones but could cause some flakiness with the test,
// thus we assert the number of TTRs doesn't exceed the double of the expected number.
assert.LessOrEqual(t, len(objs.Items), 6)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess that you can also use the len of TemplateRef from tiers.GetTemplateRefs(t, hostAwait, "ttr").Flatten(), right?
Just in case the number of templateRefs changes in the base1ns tier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

did you meant len(tiers.GetTemplateRefs(t, hostAwait, "ttr").Flatten())*2 ? because it can have less or equal double the number of TTRs .

test/e2e/parallel/nstemplatetier_test.go Outdated Show resolved Hide resolved
testsupport/cleanup/clean.go Outdated Show resolved Hide resolved
testsupport/cleanup/clean.go Outdated Show resolved Hide resolved
testsupport/wait/host.go Outdated Show resolved Hide resolved
testsupport/wait/host.go Outdated Show resolved Hide resolved
testsupport/wait/host.go Outdated Show resolved Hide resolved
Devtools added 2 commits January 8, 2025 20:44
Copy link

sonarqubecloud bot commented Jan 9, 2025

@mfrancisc
Copy link
Contributor Author

/retest

1 similar comment
@mfrancisc
Copy link
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants