expected:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/mariadb\t0.3.0 \t \tChart for MariaDB",
matches:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/mariadb\t0.3.0 \t \tChart for MariaDB",
},
},
{
{
name:"search for 'alpine', expect two matches",
name:"search for 'alpine', expect two matches",
args:[]string{"alpine"},
cmd:"search alpine",
expected:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.2.0 \t2.3.4 \tDeploy a basic Alpine Linux pod",
matches:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.2.0 \t2.3.4 \tDeploy a basic Alpine Linux pod",
},
},
{
{
name:"search for 'alpine' with versions, expect three matches",
name:"search for 'alpine' with versions, expect three matches",
args:[]string{"alpine"},
cmd:"search alpine --versions",
flags:[]string{"--versions"},
matches:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.2.0 \t2.3.4 \tDeploy a basic Alpine Linux pod\ntesting/alpine\t0.1.0 \t1.2.3 \tDeploy a basic Alpine Linux pod",
expected:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.2.0 \t2.3.4 \tDeploy a basic Alpine Linux pod\ntesting/alpine\t0.1.0 \t1.2.3 \tDeploy a basic Alpine Linux pod",
},
},
{
{
name:"search for 'alpine' with version constraint, expect one match with version 0.1.0",
name:"search for 'alpine' with version constraint, expect one match with version 0.1.0",
args:[]string{"alpine"},
cmd:"search alpine --version '>= 0.1, < 0.2'",
flags:[]string{"--version",">= 0.1, < 0.2"},
matches:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.1.0 \t1.2.3 \tDeploy a basic Alpine Linux pod",
expected:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.1.0 \t1.2.3 \tDeploy a basic Alpine Linux pod",
},
},
{
{
name:"search for 'alpine' with version constraint, expect one match with version 0.1.0",
name:"search for 'alpine' with version constraint, expect one match with version 0.1.0",
matches:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.2.0 \t2.3.4 \tDeploy a basic Alpine Linux pod\ntesting/alpine\t0.1.0 \t1.2.3 \tDeploy a basic Alpine Linux pod",
expected:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.2.0 \t2.3.4 \tDeploy a basic Alpine Linux pod\ntesting/alpine\t0.1.0 \t1.2.3 \tDeploy a basic Alpine Linux pod",
},
},
{
{
name:"search for 'syzygy', expect no matches",
name:"search for 'syzygy', expect no matches",
args:[]string{"syzygy"},
cmd:"search syzygy",
expected:"No results found",
matches:"No results found",
},
},
{
{
name:"search for 'alp[a-z]+', expect two matches",
name:"search for 'alp[a-z]+', expect two matches",
args:[]string{"alp[a-z]+"},
cmd:"search alp[a-z]+ --regexp",
flags:[]string{"--regexp"},
matches:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.2.0 \t2.3.4 \tDeploy a basic Alpine Linux pod",
expected:"NAME \tCHART VERSION\tAPP VERSION\tDESCRIPTION \ntesting/alpine\t0.2.0 \t2.3.4 \tDeploy a basic Alpine Linux pod",
},
},
{
{
name:"search for 'alp[', expect failure to compile regexp",
name:"search for 'alp[', expect failure to compile regexp",