mirror of
https://github.com/onedr0p/exportarr.git
synced 2026-02-06 10:57:32 +00:00
* remove the branch requirement to run tests feature/support-bazarr * lint makefile feature/support-bazarr * add bazarr to readme feature/support-bazarr * also comment out release image as we only want tests to happen feature/support-bazarr * initial changes to start attempting to pull bazarr i thinnk? feature/support-bazarr * make it only run the tests, but skip release image feature/support-bazarr * add a genric makefile to build container localy, run and test feature/support-bazarr * rename build command feature/support-bazarr * add pic and grafana dashboard adjustments feature/support-bazarr * refactor metrics to just be contained within 1 class * add logic to allow csv values to params * remove some todos * make api version optional feature/support-bazarr * adjust makefile to auto kill and start feature/support-bazarr * remove now invalid test feature/support-bazarr * add a test for no api version instead feature/support-bazarr * add a test to enforce csv params moving forward feature/support-bazarr * add saml payloads for all endpoints, add test that mocks and verifies result feature/support-bazarr * Update .env.dist * Update .gitignore * Update internal/client/client.go * add a tidy task --------- Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
56 lines
1.1 KiB
Go
56 lines
1.1 KiB
Go
package commands
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/onedr0p/exportarr/internal/arr/config"
|
|
base_config "github.com/onedr0p/exportarr/internal/config"
|
|
"github.com/spf13/pflag"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestBackwardsCompatibility(t *testing.T) {
|
|
params := []struct {
|
|
name string
|
|
flags *pflag.FlagSet
|
|
}{
|
|
{
|
|
name: "radarr",
|
|
flags: radarrCmd.PersistentFlags(),
|
|
},
|
|
{
|
|
name: "sonarr",
|
|
flags: sonarrCmd.PersistentFlags(),
|
|
},
|
|
{
|
|
name: "lidarr",
|
|
flags: lidarrCmd.PersistentFlags(),
|
|
},
|
|
{
|
|
name: "readarr",
|
|
flags: readarrCmd.PersistentFlags(),
|
|
},
|
|
{
|
|
name: "prowlarr",
|
|
flags: prowlarrCmd.PersistentFlags(),
|
|
},
|
|
{
|
|
name: "bazarr",
|
|
flags: bazarrCmd.PersistentFlags(),
|
|
},
|
|
}
|
|
for _, p := range params {
|
|
t.Run(p.name, func(t *testing.T) {
|
|
p.flags.Set("basic-auth-username", "user")
|
|
p.flags.Set("basic-auth-password", "pass")
|
|
|
|
require := require.New(t)
|
|
config, err := config.LoadArrConfig(base_config.Config{}, p.flags)
|
|
require.NoError(err)
|
|
require.Equal("user", config.AuthUsername)
|
|
require.Equal("pass", config.AuthPassword)
|
|
})
|
|
}
|
|
|
|
}
|