github.com/ethersphere/bee/v2@v2.2.0/pkg/api/node_test.go (about) 1 // Copyright 2021 The Swarm Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package api_test 6 7 import ( 8 "testing" 9 10 "github.com/ethersphere/bee/v2/pkg/api" 11 ) 12 13 func TestBeeNodeMode_String(t *testing.T) { 14 t.Parallel() 15 16 mapping := map[string]string{ 17 api.UnknownMode.String(): "unknown", 18 api.LightMode.String(): "light", 19 api.FullMode.String(): "full", 20 api.DevMode.String(): "dev", 21 } 22 23 for have, want := range mapping { 24 if have != want { 25 t.Fatalf("unexpected bee node mode: have %q; want %q", have, want) 26 } 27 } 28 }