carlos / platform Public

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

Plain git — no account needed to clone.

Download

Download this file

1//go:build !linux
2
3package hostenv
4
5import "testing"
6
7// U3: off Linux there is no checked write, so write refuses and leaves
8// nothing behind.
9func TestWriteRefusesOffLinux(t *testing.T) {
10 root := t.TempDir()
11 err := writeHostEnv(root, []byte("CARLOS_REGION=ie\n"))
12 if err == nil || err.Error() != "carlos system host-env write runs only on Linux" {
13 t.Fatalf("%v", err)
14 }
15}
16