HomePhorge

(#4487) Fix environment column in hosts table
7f4e058133a0Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#4487) Fix environment column in hosts table

An entire environment object was being stored in a string field,
causing the ZAML form of the environment to be stored. This was
over-ridden to return just the ZAML serialized version of the name.
Since the hosts model didn't know how to interpret a serialized
value, it just returned the ZAML string as the environment. This
patch stringifies the environment before putting it in the hosts
table, which stores it properly.

This patch also introduces a new method of testing using Tableless
ActiveRecord models, which emulate their database schema. This
helps to eliminate some stubbing, but it is still impossible to
fully and accurately test all ActiveRecord interactions without a
real database.

Paired-With: Matt Robinson

Details

Provenance
Nick Lewis <nick@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU93526712755d: Merge branch 'ticket/2.6.next/4943' into 2.6.next
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Lewis <nick@puppetlabs.com> committed rPU7f4e058133a0: (#4487) Fix environment column in hosts table (authored by Nick Lewis <nick@puppetlabs.com>).Dec 14 2010, 2:15 AM