carlos / platform Public

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

Plain git — no account needed to clone.

Download

Download this file

1package lease_test
2
3import (
4 "github.com/carlosframework/platform/internal/hostbox"
5 "github.com/carlosframework/platform/internal/hostclaim"
6 "github.com/carlosframework/platform/internal/lease"
7 "testing"
8)
9
10func TestBindGenerationAcceptsRealGenerationPrefix(t *testing.T) {
11 h := hostclaim.Holder{Location: "instances/x.example/inc", Generation: "one", Session: 1}
12 prefix, err := hostbox.GenerationPrefix(h)
13 if err != nil {
14 t.Fatal(err)
15 }
16 if err := lease.GenerationTestBinding(h.Location, prefix); err != nil {
17 t.Fatalf("real prefix %q: %v", prefix, err)
18 }
19}
20