@@ -294,14 +294,115 @@ def test_read_with_options_success(self, runs_service):
294294 mock_response_data = {
295295 "data" : {
296296 "id" : "run-detailed-123" ,
297+ "type" : "runs" ,
297298 "attributes" : {
298- "status" : "planned" ,
299- "source" : "tfe-api" ,
300- "message" : "Detailed read test" ,
301- "created-at" : "2023-01-01T12:00:00Z" ,
299+ "actions" : {
300+ "is-cancelable" : False ,
301+ "is-confirmable" : False ,
302+ "is-discardable" : False ,
303+ "is-force-cancelable" : False ,
304+ },
305+ "allow-config-generation" : False ,
306+ "allow-empty-apply" : False ,
307+ "auto-apply" : False ,
308+ "canceled-at" : None ,
309+ "created-at" : "2026-02-19T01:58:46.126Z" ,
302310 "has-changes" : True ,
303311 "is-destroy" : False ,
312+ "message" : "Triggered via CLI" ,
313+ "plan-only" : False ,
314+ "refresh" : True ,
315+ "refresh-only" : False ,
316+ "replace-addrs" : None ,
317+ "save-plan" : False ,
318+ "source" : "terraform+cloud" ,
319+ "status-timestamps" : {
320+ "errored-at" : "2026-02-19T01:59:19+00:00" ,
321+ "planned-at" : "2026-02-19T01:59:16+00:00" ,
322+ "queuing-at" : "2026-02-19T01:58:46+00:00" ,
323+ "planning-at" : "2026-02-19T01:58:48+00:00" ,
324+ "plan-queued-at" : "2026-02-19T01:58:46+00:00" ,
325+ "plan-queueable-at" : "2026-02-19T01:58:46+00:00" ,
326+ },
327+ "status" : "errored" ,
328+ "target-addrs" : None ,
329+ "trigger-reason" : "manual" ,
330+ "terraform-version" : "1.13.5" ,
331+ "updated-at" : "2026-02-19T01:59:19.891Z" ,
332+ "permissions" : {
333+ "can-apply" : True ,
334+ "can-cancel" : True ,
335+ "can-comment" : True ,
336+ "can-discard" : True ,
337+ "can-force-execute" : True ,
338+ "can-force-cancel" : True ,
339+ "can-override-policy-check" : True ,
340+ },
341+ "variables" : [],
342+ "invoke-action-addrs" : None ,
343+ },
344+ "relationships" : {
345+ "workspace" : {
346+ "data" : {"id" : "ws-a2Kntu53K79hsPRH" , "type" : "workspaces" }
347+ },
348+ "apply" : {
349+ "data" : {"id" : "apply-Y1rVt6MpiwzdMjbK" , "type" : "applies" },
350+ "links" : {"related" : "/api/v2/runs/run-ugBnsFDyDviC876w/apply" },
351+ },
352+ "configuration-version" : {
353+ "data" : {
354+ "id" : "cv-bakH4hn9cPXb2yZq" ,
355+ "type" : "configuration-versions" ,
356+ },
357+ "links" : {
358+ "related" : "/api/v2/runs/run-ugBnsFDyDviC876w/configuration-version"
359+ },
360+ },
361+ "created-by" : {
362+ "data" : {"id" : "user-FRJGnNMX6fpe9Cdd" , "type" : "users" },
363+ "links" : {
364+ "related" : "/api/v2/runs/run-ugBnsFDyDviC876w/created-by"
365+ },
366+ },
367+ "plan" : {
368+ "data" : {"id" : "plan-WooDdHWZnSE3Zs8j" , "type" : "plans" },
369+ "links" : {"related" : "/api/v2/runs/run-ugBnsFDyDviC876w/plan" },
370+ },
371+ "run-events" : {
372+ "data" : [
373+ {"id" : "re-bqJGaaCrt5QZfexJ" , "type" : "run-events" },
374+ {"id" : "re-j8d6eWyfyHSUbX7x" , "type" : "run-events" },
375+ {"id" : "re-UAXd9VyRTXZy3hpx" , "type" : "run-events" },
376+ {"id" : "re-DFFf51Doi8mmHC9G" , "type" : "run-events" },
377+ {"id" : "re-U2m4RMQhEY9voN1K" , "type" : "run-events" },
378+ {"id" : "re-WWfUbu5NTWdYKgBs" , "type" : "run-events" },
379+ ],
380+ "links" : {
381+ "related" : "/api/v2/runs/run-ugBnsFDyDviC876w/run-events"
382+ },
383+ },
384+ "task-stages" : {
385+ "data" : [],
386+ "links" : {
387+ "related" : "/api/v2/runs/run-ugBnsFDyDviC876w/task-stages"
388+ },
389+ },
390+ "policy-checks" : {
391+ "data" : [
392+ {"id" : "polchk-JxgtJ56kFifnngyT" , "type" : "policy-checks" }
393+ ],
394+ "links" : {
395+ "related" : "/api/v2/runs/run-ugBnsFDyDviC876w/policy-checks"
396+ },
397+ },
398+ "comments" : {
399+ "data" : [],
400+ "links" : {
401+ "related" : "/api/v2/runs/run-ugBnsFDyDviC876w/comments"
402+ },
403+ },
304404 },
405+ "links" : {"self" : "/api/v2/runs/run-ugBnsFDyDviC876w" },
305406 }
306407 }
307408
@@ -330,6 +431,10 @@ def test_read_with_options_success(self, runs_service):
330431 # Verify result
331432 assert isinstance (result , Run )
332433 assert result .id == "run-detailed-123"
434+ assert result .created_by .id == "user-FRJGnNMX6fpe9Cdd"
435+ assert result .plan .id == "plan-WooDdHWZnSE3Zs8j"
436+ assert result .apply .id == "apply-Y1rVt6MpiwzdMjbK"
437+ assert result .workspace .id == "ws-a2Kntu53K79hsPRH"
333438
334439 def test_apply_run_success (self , runs_service ):
335440 """Test successful apply operation."""
0 commit comments