Skip to content

Commit 894b81b

Browse files
remove index in order to keep all docs following the same standard (#2865)
* remove index in order to keep all docs following the same standard * fix:links
1 parent 22c6e55 commit 894b81b

File tree

3 files changed

+2
-49
lines changed

3 files changed

+2
-49
lines changed

doc/user/unit-testing.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
# Unit testing with Operator SDK
22
------------
33

4-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
5-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
6-
**Table of Contents** <!-- *generated with [DocToc](https://github.com/thlorenz/doctoc)* -->
7-
8-
- [Overview](#overview)
9-
- [Using a Fake client](#using-a-fake-client)
10-
- [Testing Reconcile](#testing-reconcile)
11-
- [Testing with 3rd Party Resources](#testing-with-3rd-party-resources)
12-
- [How to increase the verbosity of the logs?](#how-to-increase-the-verbosity-of-the-logs)
13-
14-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
15-
164
## Overview
175

186
Testing your operator should involve both unit and [end-to-end][doc-e2e-test] tests. Unit tests assess the expected outcomes of individual operator components without requiring coordination between components. Operator unit tests should test multiple scenarios likely to be encountered by your custom operator logic at runtime. Much of your custom logic will involve API server calls via a [client][doc-client]; `Reconcile()` in particular will be making API calls on each reconciliation loop. These API calls can be mocked by using `controller-runtime`'s [fake client][doc-cr-fake-client], perfect for unit testing. This document steps through writing a unit test for the [memcached-operator][repo-memcached-reconcile]'s `Reconcile()` method using a fake client.
@@ -261,7 +249,7 @@ func TestMemcachedController(t *testing.T) {
261249
<!-- Link vars declaration -->
262250
<!-- NOTE: The CI has a bug and the test will not pass with _ . Use "-" instead of "_" -->
263251

264-
[doc-e2e-test]: ../test-framework/writing-e2e-tests.md
252+
[doc-e2e-test]: ../../website/content/en/docs/golang/e2e-tests.md
265253
[doc-client]: client.md
266254
[doc-cr-fake-client]: https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg/client/fake
267255
[repo-memcached-reconcile]: https://github.com/operator-framework/operator-sdk-samples/blob/4c6934448684a6953ece4d3d9f3f77494b1c125e/memcached-operator/pkg/controller/memcached/memcached_controller.go#L82

website/content/en/docs/golang/unit-testing.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ linkTitle: Unit Testing
44
weight: 10
55
---
66

7-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
8-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
9-
**Table of Contents** <!-- *generated with [DocToc](https://github.com/thlorenz/doctoc)* -->
10-
11-
- [Overview](#overview)
12-
- [Using a Fake client](#using-a-fake-client)
13-
- [Testing Reconcile](#testing-reconcile)
14-
- [Testing with 3rd Party Resources](#testing-with-3rd-party-resources)
15-
- [How to increase the verbosity of the logs?](#how-to-increase-the-verbosity-of-the-logs)
16-
17-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
18-
197
## Overview
208

219
Testing your operator should involve both unit and [end-to-end][doc-e2e-test] tests. Unit tests assess the expected outcomes of individual operator components without requiring coordination between components. Operator unit tests should test multiple scenarios likely to be encountered by your custom operator logic at runtime. Much of your custom logic will involve API server calls via a [client][doc-client]; `Reconcile()` in particular will be making API calls on each reconciliation loop. These API calls can be mocked by using `controller-runtime`'s [fake client][doc-cr-fake-client], perfect for unit testing. This document steps through writing a unit test for the [memcached-operator][repo-memcached-reconcile]'s `Reconcile()` method using a fake client.
@@ -264,7 +252,7 @@ func TestMemcachedController(t *testing.T) {
264252
<!-- Link vars declaration -->
265253
<!-- NOTE: The CI has a bug and the test will not pass with _ . Use "-" instead of "_" -->
266254

267-
[doc-e2e-test]: /docs/test-framework/writing-e2e-tests/
255+
[doc-e2e-test]: e2e-tests
268256
[doc-client]: /docs/golang/references/client/
269257
[doc-cr-fake-client]: https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg/client/fake
270258
[repo-memcached-reconcile]: https://github.com/operator-framework/operator-sdk-samples/blob/4c6934448684a6953ece4d3d9f3f77494b1c125e/memcached-operator/pkg/controller/memcached/memcached_controller.go#L82

website/content/en/docs/scorecard/_index.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,6 @@ weight: 20
55

66
# operator-sdk scorecard
77

8-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
9-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
10-
<!-- **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -->
11-
12-
- [Overview](#overview)
13-
- [Requirements](#requirements)
14-
- [Running the Scorecard](#running-the-scorecard)
15-
- [Configuration](#configuration)
16-
- [Config File](#config-file)
17-
- [Command Args](#command-args)
18-
- [Config File Options](#config-file-options)
19-
- [Plugins](#plugins)
20-
- [Basic and OLM](#basic-and-olm)
21-
- [Tests Performed](#tests-performed)
22-
- [Basic Operator](#basic-operator)
23-
- [OLM Integration](#olm-integration)
24-
- [Exit Status](#exit-status)
25-
- [Extending the Scorecard with Plugins](#extending-the-scorecard-with-plugins)
26-
- [JSON format](#json-format)
27-
- [Running the scorecard with an OLM-managed operator](#running-the-scorecard-with-an-olm-managed-operator)
28-
29-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
30-
318
## Overview
329

3310
The scorecard works by creating all resources required by CRs and the operator.

0 commit comments

Comments
 (0)