2022-09-19 16:16:05 +02:00
|
|
|
// Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg.
|
|
|
|
// All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestInit(t *testing.T) {
|
|
|
|
fp := "../../configs/config.json"
|
|
|
|
Init(fp)
|
|
|
|
if Keys.Addr != "0.0.0.0:443" {
|
|
|
|
t.Errorf("wrong addr\ngot: %s \nwant: 0.0.0.0:443", Keys.Addr)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestInitMinimal(t *testing.T) {
|
|
|
|
fp := "../../docs/config.json"
|
|
|
|
Init(fp)
|
2023-02-21 13:54:42 +01:00
|
|
|
if Keys.Addr != "127.0.0.1:8080" {
|
|
|
|
t.Errorf("wrong addr\ngot: %s \nwant: 127.0.0.1:8080", Keys.Addr)
|
2022-09-19 16:16:05 +02:00
|
|
|
}
|
|
|
|
}
|