//go:build integration package redisactivity import ( "context" "testing" "time" "proxy-pool/internal/domain/workerruntime/contracttest" ) func TestRedisWorkerControlStoreContract(t *testing.T) { contracttest.Run(t, func(test *testing.T) contracttest.Fixture { fixture := newRedisTestFixture(test) now := redisTestNow() seedRedisAvailable(test, fixture.Adapter, "provider-a", now, now.Add(time.Second), 2*time.Minute, testProxy("proxy-a", "192.0.2.10")) if _, err := fixture.Adapter.Assign(context.Background(), now.Add(2*time.Second), "proxy-a", "worker-a", time.Minute); err != nil { test.Fatalf("Assign(): %v", err) } return contracttest.Fixture{ Store: fixture.Adapter, Reader: fixture.Adapter, Outcomes: fixture.Adapter, TTL: 100 * time.Millisecond, Advance: time.Sleep, } }) }