const mysqlManifestPath … type MySQLUpgradeTest … // Name returns the tracking name of the test. func (MySQLUpgradeTest) Name() string { … } // Skip returns true when this test can be skipped. func (MySQLUpgradeTest) Skip(upgCtx upgrades.UpgradeContext) bool { … } func mysqlKubectlCreate(ns, file string) { … } func (t *MySQLUpgradeTest) getServiceIP(ctx context.Context, f *framework.Framework, ns, svcName string) string { … } // Setup creates a StatefulSet, HeadlessService, a Service to write to the db, and a Service to read // from the db. It then connects to the db with the write Service and populates the db with a table // and a few entries. Finally, it connects to the db with the read Service, and confirms the data is // available. The db connections are left open to be used later in the test. func (t *MySQLUpgradeTest) Setup(ctx context.Context, f *framework.Framework) { … } // Test continually polls the db using the read and write connections, inserting data, and checking // that all the data is readable. func (t *MySQLUpgradeTest) Test(ctx context.Context, f *framework.Framework, done <-chan struct{ … } // Teardown performs one final check of the data's availability. func (t *MySQLUpgradeTest) Teardown(ctx context.Context, f *framework.Framework) { … } // addName adds a new value to the db. func (t *MySQLUpgradeTest) addName(name string) error { … } // countNames checks to make sure the values in testing.users are available, and returns // the count of them. func (t *MySQLUpgradeTest) countNames() (int, error) { … }