github.com/coreos/mantle@v0.13.0/harness/_example/doc.go (about) 1 // Copyright 2017 CoreOS, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // This example program illustrates how to create a custom test suite 16 // based on the harness package. main.go contains the test suite glue 17 // while tests.go contains example tests. 18 // 19 // The custom test suite adds a feature to give individual tests some 20 // data that can be overridden in the environment. When executed: 21 // 22 // ./example -v 23 // === RUN LogIt 24 // --- PASS: LogIt (0.00s) 25 // tests.go:27: Got "something" 26 // === RUN SkipIt 27 // --- SKIP: SkipIt (0.00s) 28 // main.go:40: Missing "TEST_DATA_else" in environment. 29 // PASS 30 // 31 package main