MCPcopy
hub / github.com/github/gh-ost / TestMigratorGetProgressPercent

Function TestMigratorGetProgressPercent

go/logic/migrator_test.go:343–354  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

341}
342
343func TestMigratorGetProgressPercent(t *testing.T) {
344 migrationContext := base.NewMigrationContext()
345 migrator := NewMigrator(migrationContext, "1.2.3")
346
347 {
348 require.Equal(t, float64(100.0), migrator.getProgressPercent(0))
349 }
350 {
351 migrationContext.TotalRowsCopied = 250
352 require.Equal(t, float64(25.0), migrator.getProgressPercent(1000))
353 }
354}
355
356func TestMigratorGetMigrationStateAndETA(t *testing.T) {
357 migrationContext := base.NewMigrationContext()

Callers

nothing calls this directly

Calls 3

getProgressPercentMethod · 0.95
NewMigrationContextFunction · 0.92
NewMigratorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…