MCPcopy Index your code
hub / github.com/coder/coder / UpdateProvisionerLastSeenAt

Function UpdateProvisionerLastSeenAt

coderd/coderdtest/coderdtest.go:1827–1837  ·  view source on GitHub ↗

UpdateProvisionerLastSeenAt updates the provisioner daemon's LastSeenAt timestamp to the specified time to prevent it from appearing stale during autobuild operations

(t *testing.T, db database.Store, id uuid.UUID, tickTime time.Time)

Source from the content-addressed store, hash-verified

1825// UpdateProvisionerLastSeenAt updates the provisioner daemon's LastSeenAt timestamp
1826// to the specified time to prevent it from appearing stale during autobuild operations
1827func UpdateProvisionerLastSeenAt(t *testing.T, db database.Store, id uuid.UUID, tickTime time.Time) {
1828 t.Helper()
1829 ctx := ctxWithProvisionerPermissions(context.Background())
1830 t.Logf("Updating provisioner %s LastSeenAt to %v", id, tickTime)
1831 err := db.UpdateProvisionerDaemonLastSeenAt(ctx, database.UpdateProvisionerDaemonLastSeenAtParams{
1832 ID: id,
1833 LastSeenAt: sql.NullTime{Time: tickTime, Valid: true},
1834 })
1835 require.NoError(t, err)
1836 t.Logf("Successfully updated provisioner LastSeenAt")
1837}
1838
1839func MustWaitForAnyProvisioner(t *testing.T, db database.Store) {
1840 t.Helper()

Calls 4

HelperMethod · 0.65
LogfMethod · 0.65