Commit Graph

10899 Commits (a7e328c211262cda99ec1324a846b2ee30ee9a0a)

Author SHA1 Message Date
Satnam Singh db416c4f39 Merge pull request #3970 from justinsb/fix_aws
aws cluster/kube-up.sh fixes
2015-01-30 07:56:01 -08:00
Deyuan Deng c793c4f0ab Sync node status from node controller to master. 2015-01-29 23:17:15 -05:00
Justin Santa Barbara 993071dd64 Add aws to some e2e tests 2015-01-29 20:35:35 -05:00
Tim Hockin d01ea11a6e Merge pull request #3856 from smarterclayton/validation_logic_needs_cleanup
Validation of ObjectMeta is inconsistently applied
2015-01-29 14:12:44 -08:00
Satnam Singh 4fa0baa7df Merge pull request #3925 from filbranden/e2e_ginkgo_tests_subset
Make cmd/e2e -t work again
2015-01-29 09:25:13 -08:00
Filipe Brandenburger a58b1ca39c Make liveness e2e test more hermetic
Avoid importing the YAML files from the examples/ tree, instead just
define the api.Pod structs in the Go source code.

Tested by running the TestLivenessHttp and TestLivenessExec tests
against a test cluster.
2015-01-29 00:09:12 -08:00
Filipe Brandenburger fa845030c4 Make cmd/e2e --test work after the conversion to Ginkgo
Use the --ginkgo.focus flag which accepts a regexp to define which tests
should be run. Create a regexp matching a full word that is exactly one
of the test names passed as -t parameters.

Tested with cmd/e2e -t TestLivenessHttp -t TestLivenessExec, confirmed
that 2 tests were executed and 9 were skipped.
2015-01-28 21:11:23 -08:00
Filipe Brandenburger 47739abb30 Make it possible to re-enable color output in Ginkgo e2e tests
Instead of forcing the NoColor flag to on at runtime, make it default to
being on in a way that it's still possible to override it by passing e2e
the --ginkgo.noColor=false command-line flag.

Tested by running the tests with and without the flag and confirming
that both worked as expected.
2015-01-28 20:25:46 -08:00
Brian Grant fcb1cd30ff Merge pull request #3891 from nikhiljindal/Operation
Deleting OperationHandler for handling /operation endpoint on server
2015-01-28 17:01:37 -08:00
Filipe Brandenburger bd79d00e22 Generate JUnit XML for Jenkins from the Go e2e tests
Use ginkgo's native support for JUnit in order to generate the XML file.

This is a first step in better integration of our e2e tests with
Jenkins. In order to improve the logged information, we will probably
need to have more native ginkgo tests but this step allows us to see
what Jenkins can already do with this information and what we need to
tweak to improve it.

Tested by running the full e2e tests and inspecting the contents of
junit.xml on the top of the tree.

Textual output is still generated on the console to keep the current
goe2e.sh logs available until the full conversion of our Jenkins
instance to use the JUnit XML is completed.
2015-01-28 15:09:53 -08:00
Filipe Brandenburger 1c028de03a Initial adoption of ginkgo in e2e tests
In order to adopt ginkgo incrementally, let's start by replacing
test/e2e/driver.go with a call to ginkgo runner and convert each of the
other tests to a small Decscribe() snippet that simply calls the legacy
TestXYZ function.

From this basis we can take further incremental steps by converting
individual tests to native ginkgo format, using Fail() for all failure
cases, using By() for logs, enabling JUnit reports, etc.

Tested:
- cmd/e2e builds and `make check` passes.
- Running _output/bin/.../e2e on an alive cluster works.
- Running the full hack/e2e-test.sh works as expected.
2015-01-28 15:09:53 -08:00
nikhiljindal 521728e920 Deleting OperationHandler for handling /operation endpoint on server 2015-01-28 13:13:10 -08:00
Clayton Coleman a0356bca96 Unify validation logic for create and update paths
Ensure ObjectMeta is consistently validated on both create and update

Make PortalIP uncleareable
2015-01-28 13:10:37 -05:00
Clayton Coleman 5117189e03 Merge pull request #3707 from nikhiljindal/preOperations
Removing support for asynchronous server requests
2015-01-28 13:02:52 -05:00
Tim Hockin 988d15943f Merge pull request #3787 from satnam6502/serve_hostname
Reduce size of serve_hostname image
2015-01-28 09:07:26 -08:00
nikhiljindal de60600608 Making all operations synchronous 2015-01-27 18:47:56 -08:00
Satnam Singh 3841d1b5d1 Reduce size of serve_hostname image 2015-01-24 09:49:26 -08:00
Satnam Singh 2d1ee816a1 Change TestNetwork to allow parallel execution 2015-01-23 17:56:15 -08:00
Filipe Brandenburger 73bd452e76 Revert "Allow network end-to-end test to be run in parallel" 2015-01-23 11:11:31 -08:00
Filipe Brandenburger df84f70781 Merge pull request #3749 from satnam6502/network
Allow network end-to-end test to be run in parallel
2015-01-23 09:20:22 -08:00
Satnam Singh 85691cba24 Allow network end-to-end test to be run in parallel 2015-01-22 17:55:00 -08:00
Filipe Brandenburger a56cd2867e Merge pull request #3746 from satnam6502/roservice
Reinstate ROService test now that rate limit issue has been addressed
2015-01-22 16:37:07 -08:00
Satnam Singh 472488d572 Reinstate ROService test now that rate limit issue has been addressed 2015-01-22 16:29:55 -08:00
Satnam Singh cff7cab77f Allow cluster DNS e2e test to be run in parallel 2015-01-22 15:39:57 -08:00
Filipe Brandenburger 7d0e1f0d62 Merge pull request #3724 from satnam6502/noenv
Remove use of KUBERNETES_PROVIDER env var from Go end to end tests
2015-01-22 12:21:39 -08:00
Satnam Singh 1bae69a9c4 Remove use of KUBERNETES_PROVIDER env var from Go end to end tests 2015-01-22 11:56:13 -08:00
Satnam Singh eb819c9e08 Use a fresh client for each Go end-to-end test 2015-01-22 11:00:07 -08:00
Satnam Singh 1e9c37d507 Merge pull request #3715 from filbranden/e2e_liveness_go1
Convert liveness e2e test to Go
2015-01-22 10:58:57 -08:00
Satnam Singh 7a149e6e16 Understand why cluster_dns e2e test fails 2015-01-22 09:56:40 -08:00
Filipe Brandenburger df6ab47c6e Convert liveness e2e test to Go
This commit reimplements hack/e2e-suite/liveness.sh in Go as part of cmd/e2e.

Tested by running it on a live cluster:
  $ cmd/e2e --host=https://w.x.y.z --provider=gce -t TestLivenessHttp -t TestLivenessExec
  I0122 08:12:53.183298    6502 liveness.go:72] Restart count of pod liveness-exec-6f917474-a251-11e4-8cc2-d4ae52bb3eea increased from 0 to 1 during the test
  I0122 08:13:23.605471    6502 liveness.go:72] Restart count of pod liveness-http-84d28569-a251-11e4-8cc2-d4ae52bb3eea increased from 0 to 1 during the test

Also ran the full e2e suite including kube-up/kube-down to confirm it works.
2015-01-22 09:24:53 -08:00
Satnam Singh 0beb6a2a33 Disable TestKubernetesROService e2e test 2015-01-21 15:22:08 -08:00
Dawn Chen d2ebbcaf90 Merge pull request #3661 from thockin/volume-source-as-non-pointer
Make VolumeSource not be a pointer
2015-01-21 12:39:49 -08:00
Brian Grant 91533095e5 Merge pull request #3656 from jbeda/vagrant-e2e
Fix up a bunch of vagrant stuff to enable e2e
2015-01-21 07:26:13 -08:00
Satnam Singh fc83ba704b Make basic end to end test robustly wait for hostIP 2015-01-20 19:30:13 -08:00
Tim Hockin 819803b79f Make VolumeSource not be a pointer
There's no reason for it to be a pointer.
2015-01-20 17:54:04 -08:00
Joe Beda 20c594066b Disable a couple of e2e tests for vagrant for now.
The core issue is that vagrant lacks connectivity from master to containers.
2015-01-20 13:59:43 -08:00
Alex Robinson 9e3c93a064 Merge pull request #3615 from zmerlynn/random_shuffle_go
cmd/e2e: Port --orderseed and --times to cmd/e2e from hack/e2e
2015-01-20 10:24:50 -08:00
Zach Loafman 868d2c4336 cmd/e2e: Port --orderseed and --times to cmd/e2e from hack/e2e
* Add --orderseed, shuffle order every time, report order for repeatability
* Add --times, acts like a multi-deck shoe
* Remove fixed numbering in TAP output (this is actually not needed;
TAP output is just done by outputting what assertion count you're on.)

This is essentially just a port of f3a992aa and 369064c6 (minus
reporting, which can be handled later when we make TAP, etc, better).
2015-01-19 14:50:15 -08:00
Andrew Seidl 6dee1d7fa4 Fix typos in user-facing strings 2015-01-18 01:32:34 -06:00
Satnam Singh 8b68d7ee2d Skip GET test for basic.go when no hostIP 2015-01-16 10:04:53 -08:00
Satnam Singh 33e00320bf Convert private.sh test to Go and remove basic.sh and private.sh 2015-01-15 18:04:12 -08:00
Filipe Brandenburger 6a79d4e265 Support a --test/-t repeated flag to allow run only a subset of the e2e.go tests.
This syntax is akin to what Python unittest uses for running a subset of the tests.

If a test gets skipped, log it. If an invalid test test is passed to --test, warn about it.
2015-01-15 16:30:39 -08:00
Satnam Singh 1bff012c36 Convert basic.sh e2e test to Go 2015-01-15 11:41:29 -08:00
Clayton Coleman 455bc17616 Some actions now return 405 in integration auth_test.go 2015-01-12 12:56:01 -05:00
derekwaynecarr a56087cdf8 Remove client from attributes, remove admission control interface, fix-up error codes 2015-01-07 14:42:31 -05:00
derekwaynecarr 1e2b995a79 Fix admission control in tests 2015-01-07 14:42:31 -05:00
Eric Tune 029a9b6400 Remove whoami handler.
This was a temporary thing.  Not aware of anyone using it.
2014-12-11 21:31:06 -08:00
Clayton Coleman d0087dfe62 Integration tests don't initialize with a client
Result is a 500 error if the client object is used
2014-12-10 12:08:18 -05:00
Tim Hockin ff8c5f9415 Add a Detail field to Validation Error 2014-11-24 17:28:42 -08:00
Brendan Burns e1872b9bb3 Revert part of #2512, shot in the dark that it will fix integration tests 2014-11-20 21:56:06 -08:00
Tim Hockin 95a9098311 fix 'go vet' warnings 2014-11-21 09:45:28 +08:00
Jordan Liggitt c895331277 Make master take authenticator.Request interface instead of tokenfile 2014-11-19 15:07:51 -05:00
markturansky 8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Deyuan Deng c20ceea170 Add more validation for updating node. 2014-11-17 13:42:31 -05:00
Deyuan Deng cc310e0e71 Support node label update. 2014-11-17 13:42:31 -05:00
Daniel Smith 9430bb38b8 Merge pull request #2282 from bgrant0607/docgen
Automatic API generation via go-restful
2014-11-14 13:12:25 -08:00
Daniel Smith de75e5a9bb Fix server-side namespace handling for events; add validation 2014-11-14 09:43:28 -08:00
Brian Grant 7583e1a643 Automatic API generation by adopting go-restful 2014-11-14 16:49:19 +00:00
Eric Tune 913cbd0fd1 Make deletes synchronous to avoid 202.
Also, get some POSTs I missed the last time.
2014-11-06 16:48:56 -08:00
Eric Tune f739103de9 POST synchronously so following GET will succeed.
Should reduce flakiness of this test.
2014-11-05 21:40:27 -08:00
Eric Tune 6e81e8c896 Basic ACL file.
Added function to read basic ACL from a CSV file.
Added implementation of Authorize based on that file's policies.
Added docs on authentication and authorization.
Added example file and tested it.
2014-11-05 16:06:22 -08:00
Daniel Smith c971763be2 Add anon. functions so that defers are executed where expected. 2014-11-05 14:42:37 -08:00
Daniel Smith 78d0e74b20 Clean up auth test slightly 2014-11-05 14:31:18 -08:00
Eric Tune 1668c6f107 Authorization based on namespace, kind, readonly.
Also, pass Authorizer into master.Config.
2014-11-03 17:45:15 -08:00
Eric Tune 3045035512 Get user from request and put in authz attribs.
Added integration tests for user-based auth.
2014-11-03 16:38:56 -08:00
Eric Tune 795bc7f976 Require a KubeletClient in master.New().
Without this, tests which create a master
will panic with a nil pointer when the periodic
podCache update runs.

Deleted unused FakePodInfoGetter.
Added FakeKubeletClient.
Passed to master.New.
Required a KubeletClient in master.New.
2014-11-03 16:09:41 -08:00
Dawn Chen cccf98cd61 Fix TestAuthModeAlwaysAllow.
Fix #2137
2014-11-03 09:46:45 -08:00
Eric Tune 4b74be0f06 Improve integration test
Use some constants for tokens.
Refactor tokenfile creation to function.
Reorder some test cases to make lookups follow creates so they succeed.
Add expected status code to test cases (some are not quite what expected,
so filed bugs #2112, #2113, #2114)
Check expected status codes.
Close Body after each iterations so that we don't run out of file handles
  when I add even more test cases in the next PR.
Handle that it is unpredictable whether status 200 or 202 is returned.
2014-11-02 16:31:20 -08:00
Eric Tune 55c2d6bbbb Add basic Authorization.
Added basic interface for authorizer implementations.
Added default "authorize everything" and "authorize nothing
implementations.
Added authorization check immediately after authentication check.
Added an integration test of authorization at the HTTP level of
abstraction.
2014-10-31 12:04:33 -07:00
Deyuan Deng acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00
Eric Tune 9713b58caa Allocate mux in master.New()
Callsites no longer allocate a mux.
Master now exposes method to install handlers
which use the master's auth code.  Not used
but forks (openshift) are expected to use these
methods.  These methods will later be a point
for additional plug-in functionality.
Integration tests now use the master-provided
handler which has auth, rather than using the mux,
which didn't.  Fix TestWhoAmI now that /_whoami
sits behind auth.
2014-10-29 14:31:07 -07:00
Daniel Smith 070c6c0440 Fix missing portalNets in tests once and for all by adding a default. 2014-10-29 12:27:35 -07:00
Daniel Smith 35bd8d4a11 Add e2e and integration tests. 2014-10-29 11:29:57 -07:00
Eric Tune f7ebc7d0d5 Added /_whoami and integration test for auth(z|n)
Added new endpoint /_whoami for debugging authentication.
Added integration test which checks that a user is authenticated
using token authentication.
Rearranged initialization of authenticator to support preceeding.
2014-10-28 09:33:45 -07:00
Eric Tune 40a5ca034d Integration test on master, not just apiserver.
Moved code from cmd/apiserver to pkg/master.

test/integration/client_test made to use a master object,
instead of an apiserver.Handle.

Subsequent PRs will move more handler-installation into
pkg/master, with the goal that every http.Handler of a
standalone apiserver process can also be tested
in a "testing"-style go test.

In particular, a subsequent PR will test
authorization.
2014-10-27 09:14:58 -07:00
derekwaynecarr ce30b2657a Fix integration tests 2014-10-24 11:49:04 -04:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Daniel Smith 5d24820dd5 Merge pull request #1464 from hmrm/add-etcd-config
Allow etcd config file to be passed to apiserver, kubelet, and proxy
2014-10-08 16:29:46 -07:00
Clayton Coleman 82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Haney Maxwell 4d87159eda Allow etcd config file to be passed to apiserver, kubelet, and proxy 2014-10-07 14:25:54 -07:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
derekwaynecarr 0a290506c2 Fix integration tests 2014-10-02 12:56:42 -04:00
Clayton Coleman ff2eca97d9 Refactor the client (again) to better support auth
* Allows consumers to provide their own transports for common cases.
* Supports KUBE_API_VERSION on test cases for controlling which
  api version they test against
* Provides a common flag registration method for CLIs that need
  to connect to an API server (to avoid duplicating flags)
* Ensures errors are properly returned by the server
* Add a Context field to client.Config
2014-10-01 15:23:37 -04:00
derekwaynecarr de1f94cbc7 Fix integration test 2014-09-30 14:31:17 -04:00
Daniel Smith 37e505601e add self linking to apiserver 2014-09-26 15:08:02 -07:00
Daniel Smith f211e46f20 handle watch errors everywhere 2014-09-22 17:37:12 -07:00
Clayton Coleman 5483333e29 Allow server and client to take api version as argument
* Defaults to v1beta1
* apiserver takes -storage_version which controls etcd storage version
  and the version of the client used to connect to other apiservers
* Changed signature of client.New to add version parameter
* All controller code and component code prefers the oldest (most common)
  server version
2014-09-18 23:27:28 -04:00
Clayton Coleman 61e3ce7ddc Make runtime less global for Codec
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
  sets global defaults for "most recent encoding"
  * v1beta1 is the current "latest", v1beta2 exists
  * Kill DefaultCodec, replace it with "latest.Codec"
  * This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
  package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Clayton Coleman 154a91cd33 Rename runtime.DefaultScheme to latest.Codec for ease of readability 2014-09-16 16:19:35 -04:00
Clayton Coleman fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
Daniel Smith fc09f988b4 Make tests pass again 2014-09-07 22:26:42 -07:00
Daniel Smith 1c2b65788d Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names 2014-09-07 22:19:24 -07:00
Daniel Smith a63966e73c Combine pkg/apitools and pkg/api/common and call the result pkg/runtime 2014-09-02 11:15:44 -07:00
Daniel Smith 099c8fd36f Propagate rename; tests pass again. 2014-09-02 10:42:06 -07:00
Clayton Coleman 818f357128 Client should validate the incoming host value
Convert host:port and URLs passed to client.New() into the proper
values, and return an error if the value is invalid.  Change CLI
to return an error if -master is invalid.  Remove Client.rawRequest
which was not in use, and fix the involved tests. Add NewOrDie

Preserves the behavior of the client to not auth when a non-https
URL is passed (although in the future this should be corrected).
2014-08-28 13:47:36 -04:00
Clayton Coleman 47c7c83dad Add a client integration trip that creates a pod 2014-08-28 09:59:11 -04:00
Daniel Smith 6b69ed402b Change 'sendCreate' to 'sendAdd'; integration passes. 2014-08-25 15:56:55 -07:00
Clayton Coleman b037989478 Add an integration test for etcd 2014-08-23 11:44:21 -04:00