github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/scheduler/algorithm/regression_test.go (about)

     1  package algorithm_test
     2  
     3  import (
     4  	"github.com/pf-qiu/concourse/v6/atc/db"
     5  	. "github.com/onsi/ginkgo/extensions/table"
     6  )
     7  
     8  var _ = DescribeTable("Regression tests",
     9  	(Example).Run,
    10  
    11  	Entry("exported with scopes and reruns", Example{
    12  		LoadDB: "testdata/booklit.json.gz",
    13  
    14  		Inputs: Inputs{
    15  			{
    16  				Name:     "booklit",
    17  				Resource: "booklit",
    18  				Passed:   []string{"unit"},
    19  			},
    20  		},
    21  
    22  		Result: Result{
    23  			OK: true,
    24  			Values: map[string]string{
    25  				"booklit": "imported-r1v26528",
    26  			},
    27  		},
    28  	}),
    29  
    30  	Entry("hush-house 6.0 upgrade unsatisfiable job", Example{
    31  		LoadDB: "testdata/hush-house-6.json.gz",
    32  
    33  		Inputs: Inputs{
    34  			{
    35  				Name:     "rc-image",
    36  				Resource: "rc-image",
    37  				Passed: []string{
    38  					"frp-deps",
    39  					"gin-deps",
    40  					"etcd-deps",
    41  					"hugo-deps",
    42  					"caddy-deps",
    43  					"gitea-deps",
    44  					"guardian-deps",
    45  					"concourse-deps",
    46  					"syncthing-deps",
    47  					"kubernetes-deps",
    48  					"prometheus-deps",
    49  					"sourcegraph-deps",
    50  					"concourse-cf-resource-deps",
    51  					"concourse-s3-resource-deps",
    52  					"concourse-mock-resource-deps",
    53  					"concourse-pool-resource-deps",
    54  					"concourse-time-resource-deps",
    55  					"concourse-semver-resource-deps",
    56  					"concourse-tracker-resource-deps",
    57  					"concourse-docker-image-resource-deps",
    58  					"concourse-datadog-event-resource-deps",
    59  					"concourse-github-release-resource-deps",
    60  					"concourse-registry-image-resource-deps",
    61  					"concourse-bosh-io-stemcell-resource-deps",
    62  					"concourse-concourse-pipeline-resource-deps",
    63  				},
    64  			},
    65  		},
    66  
    67  		Result: Result{
    68  			// unsatisfiable; this test exists as a benchmark
    69  			OK: true,
    70  			Values: map[string]string{
    71  				"rc-image": "imported-r31481v804095",
    72  			},
    73  		},
    74  	}),
    75  
    76  	Entry("bosh memory leak regression test", Example{
    77  		LoadDB: "testdata/bosh-versions.json.gz",
    78  
    79  		Inputs: Inputs{
    80  			{
    81  				Name:     "bosh-src",
    82  				Resource: "bosh-src",
    83  				Passed: []string{
    84  					"unit-1.9",
    85  					"unit-2.1",
    86  					"integration-2.1-mysql",
    87  					"integration-1.9-postgres",
    88  					"integration-2.1-postgres",
    89  				},
    90  			},
    91  			{
    92  				Name:     "bosh-load-tests",
    93  				Resource: "bosh-load-tests",
    94  			},
    95  		},
    96  
    97  		Result: Result{
    98  			OK: true,
    99  			Values: map[string]string{
   100  				"bosh-src":        "imported-r88v9814",
   101  				"bosh-load-tests": "imported-r89v7204",
   102  			},
   103  		},
   104  	}),
   105  
   106  	Entry("concourse deploy high cpu regression test", Example{
   107  		LoadDB: "testdata/concourse-versions-high-cpu-deploy.json.gz",
   108  
   109  		Inputs: Inputs{
   110  			{
   111  				Name:     "concourse",
   112  				Resource: "concourse",
   113  				Passed: []string{
   114  					"testflight",
   115  					"bin-testflight",
   116  				},
   117  			},
   118  			{
   119  				Name:     "version",
   120  				Resource: "version",
   121  				Passed: []string{
   122  					"testflight",
   123  					"bin-testflight",
   124  				},
   125  			},
   126  			{
   127  				Name:     "candidate-release",
   128  				Resource: "candidate-release",
   129  				Passed: []string{
   130  					"testflight",
   131  				},
   132  			},
   133  			{
   134  				Name:     "garden-linux-release",
   135  				Resource: "garden-linux",
   136  				Passed: []string{
   137  					"testflight",
   138  				},
   139  			},
   140  			{
   141  				Name:     "bin-rc",
   142  				Resource: "bin-rc",
   143  				Passed: []string{
   144  					"bin-testflight",
   145  				},
   146  			},
   147  			{
   148  				Name:     "bosh-stemcell",
   149  				Resource: "aws-stemcell",
   150  			},
   151  			{
   152  				Name:     "deployments",
   153  				Resource: "deployments",
   154  			},
   155  		},
   156  
   157  		Result: Result{
   158  			OK: true,
   159  			Values: map[string]string{
   160  				"candidate-release":    "imported-r238v448886",
   161  				"deployments":          "imported-r45v448469",
   162  				"bosh-stemcell":        "imported-r48v443997",
   163  				"bin-rc":               "imported-r765v448889",
   164  				"garden-linux-release": "imported-r17v443811",
   165  				"version":              "imported-r12v448884",
   166  				"concourse":            "imported-r62v448881",
   167  			},
   168  		},
   169  	}),
   170  
   171  	Entry("relint rc disabled stemcell high cpu regression test", Example{
   172  		LoadDB: "testdata/relint-versions.json.gz",
   173  
   174  		Inputs: Inputs{
   175  			{
   176  				Name:     "runtime-ci",
   177  				Resource: "runtime-ci",
   178  			},
   179  			{
   180  				Name:     "diego-cf-compatibility",
   181  				Resource: "diego-cf-compatibility",
   182  			},
   183  			{
   184  				Name:     "cf-release",
   185  				Resource: "cf-release-develop",
   186  				Passed: []string{
   187  					"bosh-lite-acceptance-tests",
   188  					"a1-diego-cats",
   189  				},
   190  			},
   191  			{
   192  				Name:     "bosh-lite-stemcell",
   193  				Resource: "bosh-lite-stemcell",
   194  				Passed: []string{
   195  					"bosh-lite-acceptance-tests",
   196  				},
   197  			},
   198  			{
   199  				Name:     "stemcell",
   200  				Resource: "aws-stemcell",
   201  				Passed: []string{
   202  					"a1-diego-cats",
   203  				},
   204  			},
   205  			{
   206  				Name:     "diego-final-releases",
   207  				Resource: "diego-final-releases",
   208  				Passed: []string{
   209  					"a1-diego-cats",
   210  					"bosh-lite-acceptance-tests",
   211  				},
   212  			},
   213  			{
   214  				Name:     "diego-release-master",
   215  				Resource: "diego-release-master",
   216  				Passed: []string{
   217  					"a1-diego-cats",
   218  					"bosh-lite-acceptance-tests",
   219  				},
   220  			},
   221  			{
   222  				Name:     "garden-linux-release-tarball",
   223  				Resource: "garden-linux-release-tarball",
   224  				Passed: []string{
   225  					"a1-diego-cats",
   226  					"bosh-lite-acceptance-tests",
   227  				},
   228  			},
   229  			{
   230  				Name:     "etcd-release-tarball",
   231  				Resource: "etcd-release-tarball",
   232  				Passed: []string{
   233  					"a1-diego-cats",
   234  					"bosh-lite-acceptance-tests",
   235  				},
   236  			},
   237  			{
   238  				Name:     "cflinuxfs2-rootfs-release-tarball",
   239  				Resource: "cflinuxfs2-rootfs-release-tarball",
   240  				Passed: []string{
   241  					"a1-diego-cats",
   242  					"bosh-lite-acceptance-tests",
   243  				},
   244  			},
   245  		},
   246  
   247  		Result: Result{
   248  			// unsatisfiable; this test exists as a benchmark
   249  			OK: false,
   250  			Errors: map[string]string{
   251  				"stemcell":                          string(db.NoSatisfiableBuilds),
   252  				"diego-final-releases":              string(db.NoSatisfiableBuilds),
   253  				"garden-linux-release-tarball":      string(db.NoSatisfiableBuilds),
   254  				"cflinuxfs2-rootfs-release-tarball": string(db.NoSatisfiableBuilds),
   255  				"cf-release":                        string(db.NoSatisfiableBuilds),
   256  				"bosh-lite-stemcell":                string(db.NoSatisfiableBuilds),
   257  				"diego-release-master":              string(db.NoSatisfiableBuilds),
   258  				"etcd-release-tarball":              string(db.NoSatisfiableBuilds),
   259  			},
   260  		},
   261  	}),
   262  
   263  	Entry("relint rc high cpu regression test", Example{
   264  		LoadDB: "testdata/relint-versions-2.json.gz",
   265  
   266  		Inputs: Inputs{
   267  			{
   268  				Name:     "runtime-ci",
   269  				Resource: "runtime-ci",
   270  			},
   271  			{
   272  				Name:     "diego-cf-compatibility",
   273  				Resource: "diego-cf-compatibility",
   274  			},
   275  			{
   276  				Name:     "cf-release",
   277  				Resource: "cf-release-develop",
   278  				Passed: []string{
   279  					"bosh-lite-acceptance-tests",
   280  					"aws-acceptance-tests",
   281  					"vsphere-acceptance-tests",
   282  				},
   283  			},
   284  			{
   285  				Name:     "bosh-lite",
   286  				Resource: "bosh-lite",
   287  				Passed: []string{
   288  					"bosh-lite-acceptance-tests",
   289  				},
   290  			},
   291  			{
   292  				Name:     "bosh-lite-stemcell",
   293  				Resource: "bosh-lite-stemcell",
   294  				Passed: []string{
   295  					"bosh-lite-acceptance-tests",
   296  				},
   297  			},
   298  			{
   299  				Name:     "vsphere-stemcell",
   300  				Resource: "vsphere-stemcell",
   301  				Passed: []string{
   302  					"vsphere-acceptance-tests",
   303  				},
   304  			},
   305  			{
   306  				Name:     "aws-stemcell",
   307  				Resource: "aws-stemcell",
   308  				Passed: []string{
   309  					"aws-acceptance-tests",
   310  				},
   311  			},
   312  			{
   313  				Name:     "diego-release-tarball",
   314  				Resource: "diego-release-tarball",
   315  				Passed: []string{
   316  					"aws-acceptance-tests",
   317  					"bosh-lite-acceptance-tests",
   318  					"vsphere-acceptance-tests",
   319  				},
   320  			},
   321  			{
   322  				Name:     "garden-linux-release-tarball",
   323  				Resource: "garden-linux-release-tarball",
   324  				Passed: []string{
   325  					"aws-acceptance-tests",
   326  					"bosh-lite-acceptance-tests",
   327  					"vsphere-acceptance-tests",
   328  				},
   329  			},
   330  			{
   331  				Name:     "etcd-release-tarball",
   332  				Resource: "etcd-release-tarball",
   333  				Passed: []string{
   334  					"aws-acceptance-tests",
   335  					"bosh-lite-acceptance-tests",
   336  					"vsphere-acceptance-tests",
   337  				},
   338  			},
   339  			{
   340  				Name:     "cflinuxfs2-rootfs-release-tarball",
   341  				Resource: "cflinuxfs2-rootfs-release-tarball",
   342  				Passed: []string{
   343  					"aws-acceptance-tests",
   344  					"bosh-lite-acceptance-tests",
   345  					"vsphere-acceptance-tests",
   346  				},
   347  			},
   348  			{
   349  				Name:     "vsphere-director-version",
   350  				Resource: "vsphere-director-version",
   351  				Passed: []string{
   352  					"vsphere-acceptance-tests",
   353  				},
   354  			},
   355  			{
   356  				Name:     "aws-director-version",
   357  				Resource: "aws-director-version",
   358  				Passed: []string{
   359  					"aws-acceptance-tests",
   360  				},
   361  			},
   362  			{
   363  				Name:     "bosh-lite-director-version",
   364  				Resource: "bosh-lite-director-version",
   365  				Passed: []string{
   366  					"bosh-lite-acceptance-tests",
   367  				},
   368  			},
   369  			{
   370  				Name:     "vsphere-build-url",
   371  				Resource: "vsphere-build-url",
   372  				Passed: []string{
   373  					"vsphere-acceptance-tests",
   374  				},
   375  			},
   376  			{
   377  				Name:     "aws-build-url",
   378  				Resource: "aws-build-url",
   379  				Passed: []string{
   380  					"aws-acceptance-tests",
   381  				},
   382  			},
   383  			{
   384  				Name:     "bosh-lite-build-url",
   385  				Resource: "bosh-lite-build-url",
   386  				Passed: []string{
   387  					"bosh-lite-acceptance-tests",
   388  				},
   389  			},
   390  		},
   391  
   392  		Result: Result{
   393  			OK: true,
   394  			Values: map[string]string{
   395  				"bosh-lite-stemcell":                "imported-r481v115766",
   396  				"bosh-lite-build-url":               "imported-r678v147165",
   397  				"vsphere-director-version":          "imported-r682v147119",
   398  				"bosh-lite-director-version":        "imported-r681v147130",
   399  				"bosh-lite":                         "imported-r480v140408",
   400  				"runtime-ci":                        "imported-r494v147631",
   401  				"garden-linux-release-tarball":      "imported-r477v132094",
   402  				"etcd-release-tarball":              "imported-r478v142504",
   403  				"diego-release-tarball":             "imported-r696v143482",
   404  				"aws-stemcell":                      "imported-r482v146776",
   405  				"vsphere-build-url":                 "imported-r679v147136",
   406  				"aws-build-url":                     "imported-r677v147123",
   407  				"aws-director-version":              "imported-r680v147110",
   408  				"diego-cf-compatibility":            "imported-r475v147167",
   409  				"cflinuxfs2-rootfs-release-tarball": "imported-r479v146681",
   410  				"cf-release":                        "imported-r470v147078",
   411  				"vsphere-stemcell":                  "imported-r484v146782",
   412  			},
   413  		},
   414  	}),
   415  )