mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-11-04 01:25:06 +01:00 
			
		
		
		
	.github
api
cmd
configs
init
internal
api
archiver
auth
config
config.go
config_test.go
default_metrics.go
graph
importer
metricDataDispatcher
metricdata
repository
routerConfig
tagger
taskManager
util
pkg
tools
web
.gitignore
.goreleaser.yaml
LICENSE
Makefile
README.md
ReleaseNotes.md
go.mod
go.sum
gqlgen.yml
startDemo.sh
tools.go
		
			
				
	
	
		
			26 lines
		
	
	
		
			599 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			599 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright (C) 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 := "../../configs/config-demo.json"
 | 
						|
	Init(fp)
 | 
						|
	if Keys.Addr != "127.0.0.1:8080" {
 | 
						|
		t.Errorf("wrong addr\ngot: %s \nwant: 127.0.0.1:8080", Keys.Addr)
 | 
						|
	}
 | 
						|
}
 |