Split some CI tests for OneDrive into nightly and regular CI (#2907)
Try to reduce the overall number of tests run during regular CI by splitting most of the OneDrive RestoreAndBackup tests into a new "nightly" test suite. Regular CI will now only run against the latest backup version to make sure nothing immediate broke This should only be merged once we have a GitHub action for nightly tests and some way of reporting the outcome of the action --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [x] 🤖 Supportability/Tests - [x] 💻 CI/Deployment - [x] 🧹 Tech Debt/Cleanup #### Issue(s) * closes #2756 #### Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
adc4bb068a
commit
01a6304a62
File diff suppressed because it is too large
Load Diff
@ -12,9 +12,10 @@ import (
|
|||||||
|
|
||||||
// Flags for declaring which scope of tests to run.
|
// Flags for declaring which scope of tests to run.
|
||||||
const (
|
const (
|
||||||
CorsoCITests = "CORSO_CI_TESTS"
|
CorsoCITests = "CORSO_CI_TESTS"
|
||||||
CorsoE2ETests = "CORSO_E2E_TESTS"
|
CorsoE2ETests = "CORSO_E2E_TESTS"
|
||||||
CorsoLoadTests = "CORSO_LOAD_TESTS"
|
CorsoLoadTests = "CORSO_LOAD_TESTS"
|
||||||
|
CorsoNightlyTests = "CORSO_NIGHTLY_TESTS"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Suite interface {
|
type Suite interface {
|
||||||
@ -112,6 +113,32 @@ type loadSuite struct {
|
|||||||
suite.Suite
|
suite.Suite
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Nightly
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
func NewNightlySuite(
|
||||||
|
t *testing.T,
|
||||||
|
envSets [][]string,
|
||||||
|
runOnAnyEnv ...string,
|
||||||
|
) *nightlySuite {
|
||||||
|
RunOnAny(
|
||||||
|
t,
|
||||||
|
append(
|
||||||
|
[]string{CorsoNightlyTests},
|
||||||
|
runOnAnyEnv...,
|
||||||
|
)...,
|
||||||
|
)
|
||||||
|
|
||||||
|
MustGetEnvSets(t, envSets...)
|
||||||
|
|
||||||
|
return new(nightlySuite)
|
||||||
|
}
|
||||||
|
|
||||||
|
type nightlySuite struct {
|
||||||
|
suite.Suite
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Run Condition Checkers
|
// Run Condition Checkers
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
@ -72,6 +72,23 @@ func (suite *TesterLoadSuite) SetupSuite() {
|
|||||||
suite.called = true
|
suite.called = true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *TesterLoadSuite) TestE2ESuite() {
|
func (suite *TesterLoadSuite) TestLoadSuite() {
|
||||||
|
require.True(suite.T(), suite.called)
|
||||||
|
}
|
||||||
|
|
||||||
|
type TesterNightlySuite struct {
|
||||||
|
tester.Suite
|
||||||
|
called bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestTesterNightlySuite(t *testing.T) {
|
||||||
|
suite.Run(t, &TesterNightlySuite{Suite: tester.NewNightlySuite(t, nil)})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *TesterNightlySuite) SetupSuite() {
|
||||||
|
suite.called = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *TesterNightlySuite) TestNightlySuite() {
|
||||||
require.True(suite.T(), suite.called)
|
require.True(suite.T(), suite.called)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user