Commit Graph

9341 Commits (fe0577e1a12252e233dab3829aabf89c24027542)

Author SHA1 Message Date
Zach Loafman 490624cfb7 Merge pull request #4631 from fabioy/fix-pods.go
Move the various "defer" calls before the creation in pods.go e2e test.
2015-02-23 09:55:14 -08:00
Tim Hockin 160f288832 Implement multi-port Endpoints
This is a part of multi-port services.
2015-02-22 09:35:12 -08:00
Tim Hockin e0fd83096c Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-21 22:26:38 -08:00
Zach Loafman 93d77ab67c Merge pull request #4681 from jlowdermilk/cadvisor-e2e
Deflake cadvisor e2e by adding retry loop
2015-02-20 15:51:56 -08:00
Alex Robinson 5ea0895987 Merge pull request #4682 from a-robinson/e2e
Un-revert #4551 which moved the certs.sh e2e test to ginkgo and fix the e2e auth breakage it caused
2015-02-20 15:50:00 -08:00
Brendan Burns 9829128a75 Merge pull request #4580 from thockin/plural_20_endpoints
Part 2 of plural ports: make endpoints a struct
2015-02-20 15:42:19 -08:00
Alex Robinson fe42cd1235 Un-revert #4551 which moved the certs.sh e2e test to ginkgo and fix the
e2e auth breakage it caused. The fix is to not set project/zone/kube_master
to the empty string partway through the script, which I should have
realized was a bad idea in the first place.
2015-02-20 15:31:59 -08:00
Satnam Singh 8c7806dc4a Merge pull request #4637 from jlowdermilk/examples-e2e
Port update.sh to ginkgo test
2015-02-20 14:58:50 -08:00
Jeff Lowdermilk 881ff89d92 Deflake cadvisor e2e by adding retry loop
Wait up to 5 minutes for cadvisor to start on nodes to reduce
test failures from running immediately after cluster turnup.
2015-02-20 14:09:11 -08:00
Jeff Lowdermilk b389b360f8 Port update.sh to ginkgo test 2015-02-20 13:17:15 -08:00
Andy Goldstein 5bd0e9ab05 Add streaming command execution & port forwarding
Add streaming command execution & port forwarding via HTTP connection
upgrades (currently using SPDY).
2015-02-20 09:57:02 -05:00
Zach Loafman 7febce6321 Revert "Migrate the certs.sh e2e test to ginkgo" 2015-02-19 18:41:30 -08:00
Zach Loafman 597dedf762 Merge pull request #4551 from a-robinson/e2e
Migrate the certs.sh e2e test to ginkgo
2015-02-19 17:34:04 -08:00
Fabio Yeon 2944334db1 Move the various "defer" calls before the creation in pods.go e2e test. 2015-02-19 15:26:40 -08:00
Fabio Yeon 84b0bcf739 Clean up events.go test by removing HostPort 2015-02-19 10:55:37 -08:00
Zach Loafman 413e1dba7e Merge pull request #4569 from a-robinson/e2e-times
Fix the e2e --times flag for running tests more than once
2015-02-19 07:20:01 -08:00
Brendan Burns c9657cad04 Merge pull request #4319 from justinsb/aws_fixes
Fixes to get AWS tests to run
2015-02-18 22:43:46 -08:00
Tim Hockin ae0062d001 Part 2 of plural ports: make endpoints a struct
Includes conversions for v1b[12] and tests and fixups for call sites.
2015-02-18 19:54:15 -08:00
Alex Robinson 9f10f7714b Fix the e2e --times flag for running tests more than once. Fixes #4555. 2015-02-18 16:59:40 -08:00
Yu-Ju Hong 48ff578f7a Merge pull request #4572 from brendandburns/hostPort
Remove hostPort from several tests.
2015-02-18 16:54:05 -08:00
Brendan Burns c83c571cc7 Remove hostPort from several tests. 2015-02-18 16:11:46 -08:00
Alex Robinson 94161a44ee Pass the GCE project, zone, and master name into e2e.go as flags. 2015-02-18 15:41:36 -08:00
Alex Robinson f946aa887b Migrate the certs.sh e2e test to ginkgo. Issue #4185. 2015-02-18 13:45:44 -08:00
Paul Morie a42ff94c8f Add secret volume plugin and e2e test 2015-02-18 16:27:44 -05:00
Vishnu Kannan 4c3397cdf4 Adding an integration test for cadvisor. 2015-02-18 00:58:06 +00:00
Jeff Lowdermilk 6c3166ad13 Deflake Pods should contain environment variables for services 2015-02-13 17:58:29 -08:00
Brendan Burns a2beba5ace Add some retry to envvar log gathering. 2015-02-13 09:35:22 -08:00
Zach Loafman 6117592905 Add expectNoError helper to handle Expect(err).NotTo(HaveOccurred()) meme
And convert one file
2015-02-12 11:34:07 -08:00
Zach Loafman 62ff434825 Fix Failf line offset reporting 2015-02-12 11:33:56 -08:00
Zach Loafman 9774e9bb7b Remove unnecessary GinkgoDefer()s 2015-02-12 11:33:33 -08:00
Zach Loafman ac8e8cca78 Merge pull request #4280 from rrati/e2e-liveness-4253
E2e liveness 4253
2015-02-12 10:16:00 -08:00
Clayton Coleman 0a2d713803 Merge pull request #4263 from smarterclayton/simplify_apiserver
Remove layers of indirection between apiinstaller and resthandler
2015-02-12 10:03:41 -05:00
Zach Loafman 6b3746896f Add a Failf utility function for 'Fail(fmt.Sprintf())' and convert one file 2015-02-11 16:46:36 -08:00
Zach Loafman 251bb585bd Add a Logf utility function to print INFO: lines to GinkgoWriter, convert new file to it 2015-02-11 16:45:44 -08:00
Clayton Coleman 26f08b7807 RESTStorage should not need to know about async behavior
Also make sure all POST operations return 201 by default.
Removes the remainder of the asych logic in RESTStorage and
leaves it up to the API server to expose that behavior.
2015-02-11 16:26:08 -05:00
Clayton Coleman d167c11b59 Remove layers of indirection between apiinstaller and resthandler
Make the RESTHandler feel more go-restful, set the stage for adding
new types of subresource collections.
2015-02-11 16:26:06 -05:00
Justin Santa Barbara cf470f7da4 Fixes to get AWS tests to run
They don't pass (yet), but they at least run!
2015-02-11 15:58:33 -05:00
Zach Loafman 7efc60580e Port TestBasic and TestPrivate to Ginkgo syntax
Fixes #4261
2015-02-10 11:00:53 -08:00
Robert Rati 979ecf42d2 Moved liveness tests into the pod suite #4253 2015-02-10 13:47:48 -05:00
Zach Loafman a624b99ffa Move basic.go to rc.go 2015-02-10 08:00:10 -08:00
Robert Rati d3aa9cdc69 Convert liveness tests to native ginkgo syntax #4253 2015-02-10 09:03:54 -05:00
Zach Loafman a8991edf9e Port endpoints.go test to new-style Gingko test 2015-02-09 12:37:56 -08:00
Zach Loafman fe838fca64 Convert waitForPodSuccess to error form, glog->By
* Also add variable timeout as well
* And nail in coffin for glog in this file!
2015-02-09 07:48:07 -08:00
Zach Loafman ff67052408 Convert waitForPodNotPending from glog to By, and to error form
Also change it to take a variable timeout
2015-02-09 07:32:41 -08:00
Zach Loafman 2e4a1e910b Change loadClientOrDie to return an error
Also remove a bunch of dead code. This is a step along the path to
getting rid of all the glog in util.go.
2015-02-09 07:14:52 -08:00
Zach Loafman 2be3139926 Add a timeout to waitForPodRunning
* Add a timeout, convert the function to return an error (which gives
a reasonable status message for callers).
* Start converting glog to By.
2015-02-09 06:36:53 -08:00
Zach Loafman afcfe96fc8 Merge pull request #4223 from rrati/e2e-events-4220
E2e events 4220
2015-02-06 17:03:39 -08:00
Zach Loafman 845605458a Turn on color, turn on EmitSpecProgress 2015-02-06 15:24:32 -08:00
Robert Rati 5013375242 Converted TestKubeletSendsEvent to native ginkgo syntax #4220 2015-02-06 15:54:17 -05:00
Robert Rati cfe96c08b9 Moved kubelet_sends_events to create new events test suite #4220 2015-02-06 15:20:14 -05:00
Zach Loafman 615b1ab605 Merge pull request #4211 from rrati/e2e-networking-4179
E2e networking 4179
2015-02-06 11:26:23 -08:00
Robert Rati 1be4ab2aaa Moved TestImportantURLs to the networking suite #4179 2015-02-06 14:09:48 -05:00
Robert Rati d75d36f3d3 Ported TestImportantURLs to native ginkgo syntax #4179 2015-02-06 14:09:48 -05:00
Robert Rati a1dcec8a1c Ported TestNetwork to native ginkgo syntax #4179 2015-02-06 14:09:46 -05:00
Robert Rati 6d171a458e Renamed network.go to networking.go #4179 2015-02-06 10:47:03 -05:00
Zach Loafman 134d332793 Move verbosity flag into driver.go, randomize specs
Before we get too many suites baked, I want to get spec randomization
in, just so no one accidentally thinks things flow from top to bottom.

The random seed is printed with every run:

Random Seed: 1423194521 - Will randomize all specs

and can be reproduced using --ginkgo.seed
2015-02-05 19:49:04 -08:00
Brendan Burns b08bd8671f Merge pull request #4157 from saad-ali/updateEventApi
Add "Update Event" to Kubernetes API
2015-02-05 14:50:48 -08:00
Zach Loafman 9261c5a655 Remove timeout from cmd/e2e now that all tests are under it 2015-02-05 14:35:24 -08:00
Filipe Brandenburger 5de4c49792 Merge pull request #4153 from brendandburns/e2e
Add a simple endpoints test.
2015-02-05 13:54:33 -08:00
Zach Loafman 3fbfecccff Merge pull request #4163 from rrati/e2e-services-4162
E2e services 4162
2015-02-05 12:06:37 -08:00
Robert Rati 70237e9cc6 Changed to return in the success case testing testContext instead of using
an else statement.  #4162
2015-02-05 13:09:46 -05:00
Zach Loafman 688f96cd33 Run shell tests under Ginkgo, changing all reporting to JUnit
* Add a test/e2e/shell.go that slurps up everything in hack/e2e-suite
and runs it as a bash test, borrowing all the code from hack/e2e.go.

* Rip out all the crap in hack/e2e.go that deal with multiple tests

* Move hack/e2e-suite/goe2e.sh to hack/ginkgo-e2e.sh so that it
doesn't get slurped up.
2015-02-05 07:24:05 -08:00
Robert Rati d3e04cd246 Moved the ROService test into the services suite #4162 2015-02-05 10:23:48 -05:00
Robert Rati eefd7ace56 Converted TestKubernetesROService to native ginkgo syntax #4162 2015-02-05 10:23:48 -05:00
Robert Rati d44c1d5b84 Converted TestClusterDNS to native ginkgo syntax #4162 2015-02-05 10:23:46 -05:00
Robert Rati de848cc3f0 Moved cluster_dns to create the new service test suite #4162 2015-02-05 10:07:32 -05:00
saadali a41f520bf0 Add "Update Event" to Kubernetes API 2015-02-05 00:07:51 -08:00
Brendan Burns 30f91b0ab7 Add a simple endpoints test. 2015-02-04 22:51:36 -08:00
Filipe Brandenburger e9591382a7 Use a custom namespace for running liveness e2e test cases.
This will allow us greated isolation between test case runs without the
need to include randomized uuids to many of the fields in the pods,
services and rcs creation requests.

Tested:
- Ran two instances of `e2e -t TestLivenessHttp -t TestLivenessExec`
  simultaneously and confirmed that pod names did not clash and that
  both of them completed successfully.
2015-02-04 16:05:54 -08:00
Satnam Singh 9ec61ce355 Merge pull request #4004 from filbranden/e2e_podsvcenv_remove_embedded_json
Use api.Pod and api.Service objects instead of JSON snippets
2015-02-04 14:49:24 -08:00
deads2k 8a2fe9bd2b modify policy to correctly identify resource versus kind 2015-02-04 13:36:01 -05:00
Zach Loafman 190afa542c Reenable TestClusterDNS on GKE now that 0.9.2 is default 2015-02-04 09:34:40 -08:00
nikhiljindal 18609e1706 Moving /watch, /proxy and /redirect registration to go-restful 2015-02-03 15:47:48 -08:00
Robert Rati 50467043d5 Converted test in pods suite to use native Go definition of the api.Pod #4070 2015-02-03 15:29:23 -05:00
Filipe Brandenburger f1c354981e Use api.Pod and api.Service objects instead of JSON snippets
Start to use unique names for the pods and services. Later, we will
replace that by the use of namespaces.

We are also discussing using a versioned api, however that refactor can
happen on a follow up commit as well.

Tested by running cmd/e2e -t Pods against an API server in GCE.
2015-02-03 11:19:10 -08:00
Robert Rati 3a562b18a7 Moved TestPodHasServiceEnvVars into the pods test suite and deleted the
original file #3941
2015-02-03 09:17:14 -05:00
Robert Rati da2594710a Converted TestPodHasServiceEnvVars to native ginkgo syntax #3941 2015-02-03 09:17:14 -05:00
Robert Rati eb5d340851 Added a submit/remove test to pods #3941 2015-02-03 09:17:14 -05:00
Robert Rati e47b98db29 Converted TestPodUpdate to native ginkgo syntax #3941 2015-02-03 09:17:12 -05:00
Robert Rati 44510e11ac Renamed the pod_update file to pods #3941 2015-02-03 08:50:46 -05:00
Alex Robinson 4b0e4a111e Merge pull request #4035 from brendandburns/webtest
Fix contrib webserver so that it compiles.
2015-02-02 16:08:44 -08:00
Brendan Burns 8bce2ef61c Fix contrib webserver so that it compiles. 2015-02-02 15:20:28 -08:00
Alex Robinson 9992abdfcf Merge pull request #3997 from smarterclayton/make_master_index_optional
Make master index optional when master is used in other contexts
2015-02-02 12:45:18 -08:00
Clayton Coleman 5603714df8 Use name generation on pods via replication controllers
The generated name is '<controllerName>-%s', unless controllerName-
would be long enough to cause a validation error.
2015-02-02 14:44:53 -05:00
Satnam Singh 6d5c56b2a7 Merge pull request #3995 from filbranden/e2e_pod_update_remove_external_json
Convert load of api/examples/pod.json into native Go definition of the api.Pod
2015-02-02 11:37:19 -08:00
Alex Robinson 7868fe468e Merge pull request #3618 from saad-ali/fix2410
Make master service IP static (no longer randomly assigned)
2015-02-02 11:05:58 -08:00
derekwaynecarr d3579f0de0 Fix integration test to return 404 where a resource is not even supported 2015-02-02 10:26:19 -05:00
Clayton Coleman 42175b433a Make master index optional when master is used in other contexts
OpenShift provides a default URL at the root that shows the UI. The
provided flag makes loading the index handler optional for now.
2015-01-30 22:19:55 -05:00
saadali e83fd7b8e7 Make master service IP static (no longer randomly assigned) 2015-01-30 16:07:19 -08:00
Filipe Brandenburger 1d981f9345 Convert load of api/examples/pod.json into native Go definition of the api.Pod
This is another step in removing external dependencies of the Go e2e tests.

Remove references to this file on list of files required to run e2e tests.

Also use an unique name for the pod, so that failure in cleanup of a
previous run should not break a new run with a name conflict.

Tested by running cmd/e2e -t TestPodUpdate against an API server in GCE.
2015-01-30 15:25:56 -08:00
Filipe Brandenburger a74fce5bd7 Convert load of test/e2e/pod.json into native Go definition of the api.Pod
This is another step in removing external dependencies of the Go e2e tests.

Also remove other references to this file.

Tested by running cmd/e2e -t TestKubeletSendsEvent against an API server in GCE.
2015-01-30 13:21:09 -08:00
Satnam Singh c56dd3ddc7 Increase timeout for Go tests 2015-01-30 08:30:26 -08:00
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