Move test resource to misc/test.
This commit is contained in:
@ -123,7 +123,7 @@ func TestExportConfig(t *testing.T) {
|
||||
app.SetArgs([]string{"export"})
|
||||
app.Execute()
|
||||
|
||||
file, err := os.Open("../misc/blankConfig.json")
|
||||
file, err := os.Open("../misc/test/blankConfig.json")
|
||||
if err != nil {
|
||||
t.Fatalf("Test resource fetch error.")
|
||||
}
|
||||
@ -139,7 +139,7 @@ func TestImportConfig(t *testing.T) {
|
||||
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
relayState.Load()
|
||||
|
||||
@ -149,7 +149,7 @@ func TestImportConfig(t *testing.T) {
|
||||
app.SetArgs([]string{"export"})
|
||||
app.Execute()
|
||||
|
||||
file, err := os.Open("../misc/exampleConfig.json")
|
||||
file, err := os.Open("../misc/test/exampleConfig.json")
|
||||
if err != nil {
|
||||
t.Fatalf("Test resource fetch error.")
|
||||
}
|
||||
|
@ -13,13 +13,13 @@ import (
|
||||
func TestMain(m *testing.M) {
|
||||
var err error
|
||||
|
||||
testConfigPath := "../misc/config.yml"
|
||||
testConfigPath := "../misc/test/config.yml"
|
||||
file, _ := os.Open(testConfigPath)
|
||||
defer file.Close()
|
||||
|
||||
viper.SetConfigType("yaml")
|
||||
viper.ReadConfig(file)
|
||||
viper.Set("ACTOR_PEM", "../misc/testKey.pem")
|
||||
viper.Set("ACTOR_PEM", "../misc/test/testKey.pem")
|
||||
viper.BindEnv("REDIS_URL")
|
||||
|
||||
globalConfig, err = models.NewRelayConfig()
|
||||
|
@ -10,7 +10,7 @@ func TestListDomainSubscriber(t *testing.T) {
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
|
||||
app := configCmdInit()
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
relayState.Load()
|
||||
|
||||
@ -36,7 +36,7 @@ func TestListDomainLimited(t *testing.T) {
|
||||
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
relayState.Load()
|
||||
|
||||
@ -62,7 +62,7 @@ func TestListDomainBlocked(t *testing.T) {
|
||||
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
relayState.Load()
|
||||
|
||||
@ -130,7 +130,7 @@ func TestUnsetDomainBlocked(t *testing.T) {
|
||||
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
|
||||
app = domainCmdInit()
|
||||
@ -155,7 +155,7 @@ func TestUnsetDomainLimited(t *testing.T) {
|
||||
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
|
||||
app = domainCmdInit()
|
||||
@ -180,7 +180,7 @@ func TestSetDomainInvalid(t *testing.T) {
|
||||
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
relayState.Load()
|
||||
|
||||
@ -202,7 +202,7 @@ func TestUnfollowDomain(t *testing.T) {
|
||||
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
|
||||
app = domainCmdInit()
|
||||
@ -227,7 +227,7 @@ func TestInvalidUnfollowDomain(t *testing.T) {
|
||||
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
relayState.Load()
|
||||
|
||||
|
@ -126,7 +126,7 @@ func TestInvalidRejectFollow(t *testing.T) {
|
||||
func TestCreateUpdateActorActivity(t *testing.T) {
|
||||
app := configCmdInit()
|
||||
|
||||
app.SetArgs([]string{"import", "--json", "../misc/exampleConfig.json"})
|
||||
app.SetArgs([]string{"import", "--json", "../misc/test/exampleConfig.json"})
|
||||
app.Execute()
|
||||
|
||||
app = followCmdInit()
|
||||
|
Reference in New Issue
Block a user