carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1package console
2
3import (
4 "context"
5 "testing"
6
7 "github.com/carlosframework/platform/internal/release"
8)
9
10type fix4UnexpectedReportStore struct{ release.Store }
11
12func (fix4UnexpectedReportStore) Get(context.Context, string) ([]byte, string, error) {
13 panic("host reporting without a console ID accessed the control plane")
14}
15
16func TestPlan9Fix4FlagOffNoConsoleIDDoesNotReportOrRelease(t *testing.T) {
17 t.Setenv("CARLOS_HOST_CLAIM", "")
18 s := &Server{cfg: Config{Releases: fix4UnexpectedReportStore{}, Key: make([]byte, 64)}}
19 s.StartHostReports(t.Context())
20}
21