Skip to content

Split Terraform OSS and enterprise test suites#40534

Merged
hugoShaka merged 3 commits into
masterfrom
hugo/spit-tf-oss-and-e-tests
Apr 22, 2024
Merged

Split Terraform OSS and enterprise test suites#40534
hugoShaka merged 3 commits into
masterfrom
hugo/spit-tf-oss-and-e-tests

Conversation

@hugoShaka
Copy link
Copy Markdown
Contributor

This PR does 3 changes:

  • splits the Terraform tests in two test suites:
    • TerraformSuiteOSS
    • TerraformSuiteEnterprise
  • makes the test suites exported so they can be run from teleport.e
  • makes the enterprise tests fail when running against a non-enterprise Teleport

@hugoShaka hugoShaka added the no-changelog Indicates that a PR does not require a changelog entry label Apr 12, 2024
Comment thread integrations/terraform/testlib/terraform_oss_test.go Outdated
@hugoShaka hugoShaka force-pushed the hugo/spit-tf-oss-and-e-tests branch from 8b61f2c to edf5c5b Compare April 16, 2024 18:09
@hugoShaka hugoShaka marked this pull request as draft April 16, 2024 18:29
@hugoShaka hugoShaka force-pushed the hugo/spit-tf-oss-and-e-tests branch from edf5c5b to 5e4bc67 Compare April 17, 2024 20:18
Copy link
Copy Markdown
Contributor Author

@hugoShaka hugoShaka Apr 18, 2024

Choose a reason for hiding this comment

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

Once this PR is approved, I will add the following code into e/integration/helpers.go

package integration

import (
	"testing"

	"github.com/stretchr/testify/require"

	eauth "github.com/gravitational/teleport/e/lib/auth"
	"github.com/gravitational/teleport/lib/plugin"
)

func GetTestAuthPlugin(t *testing.T) plugin.Plugin {
	p, err := eauth.NewPlugin(eauth.Config{
		License: eauth.ValidLicense{},
	})
	require.NoError(t, err)
	return p
}

Copy link
Copy Markdown
Contributor

@marcoandredinis marcoandredinis left a comment

Choose a reason for hiding this comment

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

I would drop all the OSS references.
I think it would be simpler if we had TerraformSuite and TerraformSuiteEnterprise

Comment thread integrations/terraform/go.mod Outdated
Comment thread integrations/terraform/testlib/loginrule_test.go Outdated
@hugoShaka hugoShaka force-pushed the hugo/spit-tf-oss-and-e-tests branch from b38e190 to da30be3 Compare April 19, 2024 19:10
@hugoShaka hugoShaka marked this pull request as ready for review April 19, 2024 19:12
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from r0mant April 20, 2024 12:07
@hugoShaka hugoShaka added this pull request to the merge queue Apr 22, 2024
Merged via the queue into master with commit 0f57125 Apr 22, 2024
@hugoShaka hugoShaka deleted the hugo/spit-tf-oss-and-e-tests branch April 22, 2024 13:13
hugoShaka added a commit that referenced this pull request Apr 23, 2024
* Split TF oss and TF ent tests

* Add makefile target + use eintegration

* update go mod
github-merge-queue Bot pushed a commit that referenced this pull request Apr 23, 2024
* Copy Terraform provider from teleport-plugins repo (#40224)

* copy terraform provider

* Make dependecy checker happy + use go 1.22

* Run terraform tests in the CI, add Makefile target

* go mod tidy

* Migrate Slack access plugin tests (#38427)

* Migrate ServiceNow access plugin tests (#38413)

* Migrate ServiceNow access plugin tests

* lint

* Migrate pagerduty access plugin tests (#38412)

* Migrate opsgenie access plugin tests (#38410)

* Migrate mattermost access plugin tests (#38408)

* Migrate discord access plugin tests (#38405)

* Migrate jira access plugin tests (#38406)

* Migrate jira access plugin tests

* grant the access_request.update permission

* lint

* license

* Vendor teleport-event-handler (#40364)

* Vendor event-forwarder plugin

* fix tests + add Makefile + CI

* lint

* Fix broken test

* use a separate go.mod

* ignore event-handler in flaky tests + update go.mod

* go mod tidy

* fix TF go mod

* Fix path filtering in unit (integrations) CI (#40488)

* fix broken path filtering in workflow

* go mod tidy

* Prepare teleport access plugin enterprise test suite (#40479)

* Make AuthHelper support enterprise

* Split access OSS and Enterprise tets suites

* fix slack tests

* fix race in accesslist reminder tests

* fixup! fix race in accesslist reminder tests

* Skip flaky access plugin tests (#40525)

* Skip flaky access plugin tests

* fixup! Skip flaky access plugin tests

* Lint Terraform and Event-Handler (#40604)

* Lint Terraform and Event-Handler

* lint terraform

* add Makefile lint targets for TF and event-handler

* address feedback

* Update integrations/event-handler/Makefile

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* Split Terraform OSS and enterprise test suites (#40534)

* Split TF oss and TF ent tests

* Add makefile target + use eintegration

* update go mod

* Vendor plugin charts (#40373)

* vendor plugin charts

* add tests and version update

* re-generate go modules

* tolerate-ghsa

* bump helm to 3.14.3 to appease the dependency reviewer

* reduce go version to 1.21

* tidy after rebase

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/md size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants