2022-07-04 20:39:34 +00:00
|
|
|
// Copyright © 2022 Ettore Di Giacinto <mudler@c3os.io>
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
|
|
// with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
package config_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2023-03-29 14:25:38 +00:00
|
|
|
// . "github.com/kairos-io/kairos/pkg/config"
|
2022-07-04 20:39:34 +00:00
|
|
|
. "github.com/onsi/ginkgo/v2"
|
2023-03-29 14:25:38 +00:00
|
|
|
// . "github.com/onsi/gomega"
|
2022-07-04 20:39:34 +00:00
|
|
|
)
|
|
|
|
|
2022-08-10 16:56:07 +00:00
|
|
|
type TConfig struct {
|
2022-09-17 16:43:51 +00:00
|
|
|
Kairos struct {
|
2023-01-18 09:16:05 +00:00
|
|
|
OtherKey string `yaml:"other_key"`
|
2022-08-10 16:56:07 +00:00
|
|
|
NetworkToken string `yaml:"network_token"`
|
2022-09-17 16:43:51 +00:00
|
|
|
} `yaml:"kairos"`
|
2022-08-10 16:56:07 +00:00
|
|
|
}
|
|
|
|
|
2022-11-28 14:37:45 +00:00
|
|
|
var _ = Describe("Config", func() {
|
|
|
|
var d string
|
|
|
|
BeforeEach(func() {
|
|
|
|
d, _ = os.MkdirTemp("", "xxxx")
|
|
|
|
})
|
2022-11-25 12:54:39 +00:00
|
|
|
|
2022-11-28 14:37:45 +00:00
|
|
|
AfterEach(func() {
|
|
|
|
if d != "" {
|
|
|
|
os.RemoveAll(d)
|
|
|
|
}
|
|
|
|
})
|
2022-07-04 20:39:34 +00:00
|
|
|
})
|