|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<head> |
| 4 | +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 5 | +<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | +<meta name="theme-color" content="#375EAB"> |
| 7 | + |
| 8 | + <title>testutils - GoPages</title> |
| 9 | + |
| 10 | +<link type="text/css" rel="stylesheet" href="/pg_timetable/devel/godoc/lib/godoc/style.css"> |
| 11 | + |
| 12 | +<script>window.initFuncs = [];</script> |
| 13 | +<script src="/pg_timetable/devel/godoc/lib/godoc/jquery.js" defer></script> |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +<script>var goVersion = "go1.25.1";</script> |
| 19 | +<script src="/pg_timetable/devel/godoc/lib/godoc/godocs.js" defer></script> |
| 20 | + |
| 21 | +</head> |
| 22 | +<body> |
| 23 | + |
| 24 | +<div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;"> |
| 25 | +... |
| 26 | +</div><!-- #lowframe --> |
| 27 | + |
| 28 | +<div id="topbar" class="wide"><div class="container"> |
| 29 | +<div class="top-heading" id="heading-wide"><a href="/pg_timetable/devel/godoc/pkg/github.com/cybertec-postgresql/pg_timetable/">GoPages | Auto-generated docs</a></div> |
| 30 | +<div class="top-heading" id="heading-narrow"><a href="/pg_timetable/devel/godoc/pkg/github.com/cybertec-postgresql/pg_timetable/">GoPages</a></div> |
| 31 | +<a href="#" id="menu-button"><span id="menu-button-arrow">▽</span></a> |
| 32 | + |
| 33 | +</div></div> |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +<div id="page" class="wide"> |
| 38 | +<div class="container"> |
| 39 | + |
| 40 | + |
| 41 | + <h1> |
| 42 | + Package testutils |
| 43 | + <span class="text-muted"></span> |
| 44 | + </h1> |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +<div id="nav"></div> |
| 53 | + |
| 54 | + |
| 55 | +<!-- |
| 56 | + Copyright 2009 The Go Authors. All rights reserved. |
| 57 | + Use of this source code is governed by a BSD-style |
| 58 | + license that can be found in the LICENSE file. |
| 59 | +--> |
| 60 | +<!-- |
| 61 | + Note: Static (i.e., not template-generated) href and id |
| 62 | + attributes start with "pkg-" to make it impossible for |
| 63 | + them to conflict with generated attributes (some of which |
| 64 | + correspond to Go identifiers). |
| 65 | +--> |
| 66 | + |
| 67 | + <script> |
| 68 | + document.ANALYSIS_DATA = null; |
| 69 | + document.CALLGRAPH = null; |
| 70 | + </script> |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + <div id="short-nav"> |
| 75 | + <dl> |
| 76 | + <dd><code>import "github.com/cybertec-postgresql/pg_timetable/internal/testutils"</code></dd> |
| 77 | + </dl> |
| 78 | + <dl> |
| 79 | + <dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd> |
| 80 | + <dd><a href="#pkg-index" class="indexLink">Index</a></dd> |
| 81 | + |
| 82 | + |
| 83 | + </dl> |
| 84 | + </div> |
| 85 | + <!-- The package's Name is printed as title by the top-level template --> |
| 86 | + <div id="pkg-overview" class="toggleVisible"> |
| 87 | + <div class="collapsed"> |
| 88 | + <h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2> |
| 89 | + </div> |
| 90 | + <div class="expanded"> |
| 91 | + <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2> |
| 92 | + |
| 93 | + |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + |
| 97 | + <div id="pkg-index" class="toggleVisible"> |
| 98 | + <div class="collapsed"> |
| 99 | + <h2 class="toggleButton" title="Click to show Index section">Index ▹</h2> |
| 100 | + </div> |
| 101 | + <div class="expanded"> |
| 102 | + <h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2> |
| 103 | + |
| 104 | + <!-- Table of contents for API; must be named manual-nav to turn off auto nav. --> |
| 105 | + <div id="manual-nav"> |
| 106 | + <dl> |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + <dd><a href="#PostgresTestContainer">type PostgresTestContainer</a></dd> |
| 113 | + |
| 114 | + |
| 115 | + <dd> <a href="#SetupPostgresContainer">func SetupPostgresContainer(t *testing.T) (*PostgresTestContainer, func())</a></dd> |
| 116 | + |
| 117 | + |
| 118 | + <dd> <a href="#SetupPostgresContainerWithOptions">func SetupPostgresContainerWithOptions(t *testing.T, customizer func(*config.CmdOptions)) (*PostgresTestContainer, func())</a></dd> |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + </dl> |
| 124 | + </div><!-- #manual-nav --> |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + <h3>Package files</h3> |
| 130 | + <p> |
| 131 | + <span style="font-size:90%"> |
| 132 | + |
| 133 | + <a href="/pg_timetable/devel/godoc/src/github.com/cybertec-postgresql/pg_timetable/internal/testutils/testcontainers.go.html">testcontainers.go</a> |
| 134 | + |
| 135 | + </span> |
| 136 | + </p> |
| 137 | + |
| 138 | + </div><!-- .expanded --> |
| 139 | + </div><!-- #pkg-index --> |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + <h2 id="PostgresTestContainer">type <a href="/pg_timetable/devel/godoc/src/github.com/cybertec-postgresql/pg_timetable/internal/testutils/testcontainers.go.html#L18">PostgresTestContainer</a> |
| 150 | + <a class="permalink" href="#PostgresTestContainer">¶</a> |
| 151 | + |
| 152 | + |
| 153 | + </h2> |
| 154 | + <p>PostgresTestContainer wraps the postgres container with pg_timetable engine |
| 155 | + |
| 156 | + <pre>type PostgresTestContainer struct { |
| 157 | +<span id="PostgresTestContainer.Container"></span> Container *<a href="https://pkg.go.dev/github.com/testcontainers/testcontainers-go/modules/postgres/">postgres</a>.<a href="https://pkg.go.dev/github.com/testcontainers/testcontainers-go/modules/postgres/#PostgresContainer">PostgresContainer</a> |
| 158 | +<span id="PostgresTestContainer.Engine"></span> Engine *<a href="/pg_timetable/devel/godoc/pkg/github.com/cybertec-postgresql/pg_timetable/internal/pgengine/">pgengine</a>.<a href="/pg_timetable/devel/godoc/pkg/github.com/cybertec-postgresql/pg_timetable/internal/pgengine/#PgEngine">PgEngine</a> |
| 159 | +<span id="PostgresTestContainer.ConnStr"></span> ConnStr <a href="https://pkg.go.dev/builtin/#string">string</a> |
| 160 | +} |
| 161 | +</pre> |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + <h3 id="SetupPostgresContainer">func <a href="/pg_timetable/devel/godoc/src/github.com/cybertec-postgresql/pg_timetable/internal/testutils/testcontainers.go.html#L25">SetupPostgresContainer</a> |
| 174 | + <a class="permalink" href="#SetupPostgresContainer">¶</a> |
| 175 | + |
| 176 | + |
| 177 | + </h3> |
| 178 | + <pre>func SetupPostgresContainer(t *<a href="https://pkg.go.dev/testing/">testing</a>.<a href="https://pkg.go.dev/testing/#T">T</a>) (*<a href="#PostgresTestContainer">PostgresTestContainer</a>, func())</pre> |
| 179 | + <p>SetupPostgresContainer creates a new PostgreSQL container for testing |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + <h3 id="SetupPostgresContainerWithOptions">func <a href="/pg_timetable/devel/godoc/src/github.com/cybertec-postgresql/pg_timetable/internal/testutils/testcontainers.go.html#L31">SetupPostgresContainerWithOptions</a> |
| 186 | + <a class="permalink" href="#SetupPostgresContainerWithOptions">¶</a> |
| 187 | + |
| 188 | + |
| 189 | + </h3> |
| 190 | + <pre>func SetupPostgresContainerWithOptions(t *<a href="https://pkg.go.dev/testing/">testing</a>.<a href="https://pkg.go.dev/testing/#T">T</a>, customizer func(*<a href="/pg_timetable/devel/godoc/pkg/github.com/cybertec-postgresql/pg_timetable/internal/config/">config</a>.<a href="/pg_timetable/devel/godoc/pkg/github.com/cybertec-postgresql/pg_timetable/internal/config/#CmdOptions">CmdOptions</a>)) (*<a href="#PostgresTestContainer">PostgresTestContainer</a>, func())</pre> |
| 191 | + <p>SetupPostgresContainerWithOptions creates a PostgreSQL container with custom options |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | +<div id="footer"> |
| 210 | +Build version go1.25.1.<br> |
| 211 | +</div> |
| 212 | + |
| 213 | +</div><!-- .container --> |
| 214 | +</div><!-- #page --> |
| 215 | +</body> |
| 216 | +</html> |
0 commit comments