package impl

import (
	"flag"
	"fmt"
	"reflect"
	"testing"
)

func TestParseArguments(t *testing.T) {
	cases := []struct {
		cmdline  []string
		env      []string
		err      error
		expected WorkParameters
	}{

		{
			[]string{"setuidhelper"},
			[]string{},
			fmt.Errorf("--username missing"),
			WorkParameters{},
		},

		{
			[]string{"setuidhelper", "--minuid", "1", "--username", testUserName},
			[]string{"A=B"},
			nil,
			WorkParameters{
				uid:       testUid,
				gid:       testGid,
				workspace: "",
				logDir:    "",
				argv0:     "",
				argv:      []string{""},
				envv:      []string{"A=B"},
				dryrun:    false,
				remove:    false,
			},
		},

		{
			[]string{"setuidhelper", "--minuid", "1", "--username", testUserName, "--workspace", "/hello",
				"--logdir", "/logging", "--run", "/bin/veyron", "--", "one", "two"},
			[]string{"A=B"},
			nil,
			WorkParameters{
				uid:       testUid,
				gid:       testGid,
				workspace: "/hello",
				logDir:    "/logging",
				argv0:     "/bin/veyron",
				argv:      []string{"/bin/veyron", "one", "two"},
				envv:      []string{"A=B"},
				dryrun:    false,
				remove:    false,
			},
		},
		{
			[]string{"setuidhelper", "--username", testUserName},
			[]string{"A=B"},
			fmt.Errorf("suidhelper does not permit uids less than 501"),
			WorkParameters{},
		},

		{
			[]string{"setuidhelper", "--rm", "hello", "vanadium"},
			[]string{"A=B"},
			nil,
			WorkParameters{
				uid:       0,
				gid:       0,
				workspace: "",
				logDir:    "",
				argv0:     "",
				argv:      []string{"hello", "vanadium"},
				envv:      nil,
				dryrun:    false,
				remove:    true,
			},
		},
		{
			[]string{"setuidhelper", "--username", testUserName},
			[]string{"A=B"},
			fmt.Errorf("suidhelper does not permit uids less than 501"),
			WorkParameters{},
		},

		{
			[]string{"setuidhelper", "--minuid", "1", "--username", testUserName, "--workspace", "/hello",
				"--logdir", "/logging", "--run", "/bin/veyron", "--dryrun", "--", "one", "two"},
			[]string{"A=B"},
			nil,
			WorkParameters{
				uid:       testUid,
				gid:       testGid,
				workspace: "/hello",
				logDir:    "/logging",
				argv0:     "/bin/veyron",
				argv:      []string{"/bin/veyron", "one", "two"},
				envv:      []string{"A=B"},
				dryrun:    true,
				remove:    false,
			},
		},
	}

	for _, c := range cases {
		var wp WorkParameters
		fs := flag.NewFlagSet(c.cmdline[0], flag.ExitOnError)
		setupFlags(fs)
		fs.Parse(c.cmdline[1:])
		if err := wp.ProcessArguments(fs, c.env); !reflect.DeepEqual(err, c.err) {
			t.Fatalf("got %v, expected %v error", err, c.err)
		}
		if !reflect.DeepEqual(wp, c.expected) {
			t.Fatalf("got %#v expected %#v", wp, c.expected)
		}
	}
}
