package http import ( "testing" "github.com/stretchr/testify/assert" "edge-infra.dev/pkg/edge/datasync/internal/config/fake" ) func TestServerIsNotReady(t *testing.T) { isReady := isServerReady() assert.Equal(t, false, isReady) } func TestServerIsReady(t *testing.T) { SetIsGRPCServerReady(true) isReady := isServerReady() assert.Equal(t, true, isReady) } func TestServerIsNotAlive(t *testing.T) { isAlive := isServerAlive() assert.Equal(t, false, isAlive) } func TestServerIsAlive(t *testing.T) { fake.SetEnv() isAlive := isServerAlive() assert.Equal(t, true, isAlive) }