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:
ashmrtn 2023-03-22 14:51:44 -07:00 committed by GitHub
parent adc4bb068a
commit 01a6304a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 690 additions and 534 deletions

File diff suppressed because it is too large Load Diff

View File

@ -12,9 +12,10 @@ import (
// Flags for declaring which scope of tests to run.
const (
CorsoCITests = "CORSO_CI_TESTS"
CorsoE2ETests = "CORSO_E2E_TESTS"
CorsoLoadTests = "CORSO_LOAD_TESTS"
CorsoCITests = "CORSO_CI_TESTS"
CorsoE2ETests = "CORSO_E2E_TESTS"
CorsoLoadTests = "CORSO_LOAD_TESTS"
CorsoNightlyTests = "CORSO_NIGHTLY_TESTS"
)
type Suite interface {
@ -112,6 +113,32 @@ type loadSuite struct {
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
// ---------------------------------------------------------------------------

View File

@ -72,6 +72,23 @@ func (suite *TesterLoadSuite) SetupSuite() {
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)
}