• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2023 Google LLC
2//
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5
6package device_specific_configs
7
8import (
9	"testing"
10
11	"github.com/stretchr/testify/assert"
12)
13
14func TestConfigs_MapKeyMatchesConfigName(t *testing.T) {
15	for key, config := range Configs {
16		t.Run(config.Name, func(t *testing.T) {
17			assert.Equal(t, config.Name, key)
18		})
19	}
20}
21
22func TestConfigs_ConfigsHaveExpectedKeyValuePairs(t *testing.T) {
23	for _, config := range Configs {
24		t.Run(config.Name, func(t *testing.T) {
25			var keys []string
26			for key := range config.Keys {
27				keys = append(keys, key)
28			}
29			assert.ElementsMatch(t, []string{"arch", "model", "os"}, keys)
30		})
31	}
32}
33